Choco OS  V.0.16.9.0
Join to the chocolate world
oc_time.h
Go to the documentation of this file.
1 
28 #ifndef INC_OC_TIME_H_
29 #define INC_OC_TIME_H_
30 
31 #include <stdint.h>
32 
38 #define _________________________________________MACROS_SECTION_____________________________________________________________________________
39 
40 #define oC_ns(time) (oC_us(time) / 1000 )
41 #define oC_us(time) (oC_ms(time) / 1000 )
42 #define oC_ms(time) (oC_s(time) / 1000 )
43 #define oC_s(time) ((oC_Time_t) (time))
44 #define oC_min(time) (oC_s(60) * (time))
45 #define oC_hour(time) (oC_min(60) * (time))
46 #define oC_day(time) (oC_hour(24) * (time))
47 
48 #define oC_Time_ToNanoseconds(time) (oC_Time_ToMicroseconds(time) * 1000)
49 #define oC_Time_ToMicroseconds(time) (oC_Time_ToMiliseconds(time) * 1000)
50 #define oC_Time_ToMiliseconds(time) (oC_Time_ToSeconds(time) * 1000)
51 #define oC_Time_ToSeconds(time) (time)
52 #define oC_Time_ToMinuts(time) (oC_Time_ToSeconds(time) / 60 )
53 #define oC_Time_ToHours(time) (oC_Time_ToMinuts(time) / 60 )
54 #define oC_Time_ToDays(time) (oC_Time_ToHours(time) / 24 )
55 
56 #undef _________________________________________MACROS_SECTION_____________________________________________________________________________
57 
58 
64 #define _________________________________________TYPES_SECTION______________________________________________________________________________
65 
68 typedef double oC_Time_t;
69 typedef double oC_Timestamp_t;
70 
71 #undef _________________________________________TYPES_SECTION______________________________________________________________________________
72 
74 #endif /* INC_OC_TIME_H_ */