OSAPI  0.29
Open System API
clock_type_clock.h
1 // *****************************************************************************************
2 //
3 // File description:
4 //
5 // Author: Joao Costa
6 // Purpose: Common declarations for a clock type
7 //
8 // *****************************************************************************************
9 
10 #ifndef OSAPI_CLOCK_TYPE_CLOCK_H_
11 #define OSAPI_CLOCK_TYPE_CLOCK_H_
12 
13 // *****************************************************************************************
14 //
15 // Section: Import headers
16 //
17 // *****************************************************************************************
18 
19 // System headers
20 #include <stdint.h>
21 
22 // Import OSAPI headers
23 #include "common/types/common_type_time.h"
24 
25 // Include own headers
26 
27 
28 // *****************************************************************************************
29 //
30 // Section: Type definitions
31 //
32 // *****************************************************************************************
33 
34 
37 {
38  int64_t seconds;
39  uint64_t fraction;
40 };
41 
42 typedef struct osapi_time_offset_S t_time_offset;
43 
44 
47 {
49  int local;
51 };
52 
53 typedef struct osapi_clock_S t_clock;
54 
55 
56 
57 #endif /* OSAPI_CLOCK_TYPE_CLOCK_H_ */
osapi_clock_S::local
int local
Is time value a local time, if so it must have a time offset from Standard time.
Definition: clock_type_clock.h:49
osapi_time_offset_S::fraction
uint64_t fraction
Delta in fractions of a second (if delta is negative, the sign must be in the seconds)
Definition: clock_type_clock.h:39
osapi_time_offset_S::seconds
int64_t seconds
Delta in seconds.
Definition: clock_type_clock.h:38
osapi_time_offset_S
Structure supporting a time offset (from a standard time, for instance)
Definition: clock_type_clock.h:36
osapi_clock_S
Structure supporting a clock.
Definition: clock_type_clock.h:46
osapi_time_S
Structure supporting a time date.
Definition: common_type_time.h:65
osapi_clock_S::value
t_time value
Time value.
Definition: clock_type_clock.h:48
osapi_clock_S::offset
t_time_offset offset
Difference to the Standard Time.
Definition: clock_type_clock.h:50