My Kernel v0.1.0
time.h
Go to the documentation of this file.
1
8#ifndef KERNEL_TIME_H
9#define KERNEL_TIME_H
10
11/* The number of clock ticks in a second (1KHz). */
12#define CLOCK_PER_SECOND 1000
13
15#define SEC(_x) (_x)
16#define MS(_s) (1000 * SEC(_s))
17#define US(_s) (1000 * MS((_s)))
18#define NS(_s) (1000 * US((_s)))
22#define SEC_TO_SEC(_s) SEC(_s)
23#define MS_TO_SEC(_s) (SEC(_s) / 1000)
24#define US_TO_SEC(_s) (MS((_s)) / 1000)
25#define NS_TO_SEC(_s) (US((_s)) / 1000)
28#endif /* KERNEL_TIME_H */
29