KanoopCommonQt 2.1.1
Kanoop foundational Qt utility library
Loading...
Searching...
No Matches
timeconstants.h
1/**
2 * @brief Preprocessor constants for time-unit conversions across nanoseconds, microseconds,
3 * milliseconds, seconds, minutes, hours, and days.
4 */
5#ifndef __TIMECONSTANTS_H
6#define __TIMECONSTANTS_H
7
8
9#define __NanosecondsPerMicrosecond (uint64_t)1000L
10#define __NanosecondsPerMillisecond (uint64_t)1000000L
11#define __NanosecondsPerSecond (uint64_t)1000000000L
12#define __NanosecondsPerMinute (uint64_t)__NanosecondsPerSecond * 60L
13#define __NanosecondsPerHour (uint64_t)__NanosecondsPerMinute * 60L
14#define __NanosecondsPerDay (uint64_t)__NanosecondsPerHour * 24L
15
16#define __MicrosecondsPerMillisecond (uint64_t)1000L
17#define __MicrosecondsPerSecond (uint64_t)1000000L
18#define __MicrosecondsPerMinute (uint64_t)__MicrosecondsPerSecond * 60L
19#define __MicrosecondsPerHour (uint64_t)__MicrosecondsPerMinute * 60L
20#define __MicrosecondsPerDay (uint64_t)__MicrosecondsPerHour * 24L
21
22#define __MillisecondsPerSecond (uint64_t)1000L
23#define __MillisecondsPerMinute (uint64_t)__MillisecondsPerSecond * 60L
24#define __MillisecondsPerHour (uint64_t)__MillisecondsPerMinute * 60L
25#define __MillisecondsPerDay (uint64_t)__MillisecondsPerHour * 24L
26
27#define __SecondsPerMinute (uint64_t)60L
28#define __SecondsPerHour (uint64_t)__SecondsPerMinute * 60L
29#define __SecondsPerDay (uint64_t)__SecondsPerHour * 24L
30
31#define __MinutesPerHour (uint64_t)60L
32#define __MinutesPerDay (uint64_t)__MinutesPerHour * 24L
33
34#define __HoursPerDay (uint64_t)24L
35
36#define __DaysPerYear 365.242
37
38
39#endif //` __TIMECONSTANTS_H
40
41