time_units.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2021 Kaspar Schleiser <kaspar@schleiser.de>
3  * SPDX-FileCopyrightText: 2014 Oliver Hahm <oliver.hahm@inria.fr>
4  * SPDX-License-Identifier: LGPL-2.1-only
5  */
6 
7 #pragma once
8 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
26 #define HOURS_PER_DAY (24LU)
27 
31 #define MIN_PER_DAY (1440LU)
32 
36 #define SEC_PER_DAY (86400LU)
37 
41 #define MIN_PER_HOUR (60LU)
42 
46 #define SEC_PER_HOUR (3600LU)
47 
51 #define MS_PER_HOUR (3600000LU)
52 
56 #define US_PER_HOUR (3600000000LU)
57 
61 #define SEC_PER_MIN (60LU)
62 
66 #define CS_PER_SEC (100LU)
67 
71 #define MS_PER_SEC (1000LU)
72 
76 #define MS_PER_CS (10U)
77 
81 #define US_PER_SEC (1000000LU)
82 
86 #define US_PER_MS (1000LU)
87 
91 #define US_PER_CS (10000U)
92 
96 #define NS_PER_US (1000LU)
97 
101 #define NS_PER_MS (1000000LU)
102 
106 #define NS_PER_SEC (1000000000LLU)
107 
108 #ifdef __cplusplus
109 }
110 #endif
111