BSB Developer Docs
Loading...
Searching...
No Matches
time_macros.h
1#pragma once
2
3#define M_TO_S(m) ((m) * 60)
4#define M_TO_H(m) ((m) / 60)
5#define H_TO_M(h) ((h) * 60)
6#define H_TO_S(h) (M_TO_S(H_TO_M(h)))
7#define HM_TO_M(h, m) (H_TO_M(h) + (m))
8#define HM_TO_S(h, m) (M_TO_S(H_TO_M(h, m)))
9
10#define S_TO_M(s) ((s) / 60)
11#define S_TO_R(s) ((s) % 60)
12#define S_TO_H(h) (S_TO_M(h) / 60)
13
14#define S_TO_MS(s) ((s) * 1000)
15#define M_TO_MS(m) (S_TO_MS(M_TO_S(m)))
16
17#define MS_TO_S(ms) ((ms) / 1000)
18#define MS_TO_M(ms) (MS_TO_S(ms) / 60)