Loading...
Searching...
No Matches
time_units.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021 Kaspar Schleiser <kaspar@schleiser.de>
3 * Copyright (C) 2014 Oliver Hahm <oliver.hahm@inria.fr>
4 *
5 * This file is subject to the terms and conditions of the GNU Lesser
6 * General Public License v2.1. See the file LICENSE in the top level
7 * directory for more details.
8 */
9
10#pragma once
11
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
29#define HOURS_PER_DAY (24LU)
30
34#define MIN_PER_DAY (1440LU)
35
39#define SEC_PER_DAY (86400LU)
40
44#define MIN_PER_HOUR (60LU)
45
49#define SEC_PER_HOUR (3600LU)
50
54#define MS_PER_HOUR (3600000LU)
55
59#define US_PER_HOUR (3600000000LU)
60
64#define SEC_PER_MIN (60LU)
65
69#define CS_PER_SEC (100LU)
70
74#define MS_PER_SEC (1000LU)
75
79#define MS_PER_CS (10U)
80
84#define US_PER_SEC (1000000LU)
85
89#define US_PER_MS (1000LU)
90
94#define US_PER_CS (10000U)
95
99#define NS_PER_US (1000LU)
100
104#define NS_PER_MS (1000000LU)
105
109#define NS_PER_SEC (1000000000LLU)
110
111#ifdef __cplusplus
112}
113#endif
114