le_clock.h
Go to the documentation of this file.
1 
75 //--------------------------------------------------------------------------------------------------
82 //--------------------------------------------------------------------------------------------------
83 
84 #ifndef LEGATO_CLK_INCLUDE_GUARD
85 #define LEGATO_CLK_INCLUDE_GUARD
86 
87 //--------------------------------------------------------------------------------------------------
91 //--------------------------------------------------------------------------------------------------
92 typedef struct
93 {
94  time_t sec;
95  long usec;
97 
98 
99 //--------------------------------------------------------------------------------------------------
106 //--------------------------------------------------------------------------------------------------
107 #define LE_CLK_STRING_FORMAT_DATE_TIME "%c"
108 #define LE_CLK_STRING_FORMAT_DATE "%x"
110 #define LE_CLK_STRING_FORMAT_TIME "%X"
112 // @}
114 
115 
116 //--------------------------------------------------------------------------------------------------
126 //--------------------------------------------------------------------------------------------------
128 
129 
130 //--------------------------------------------------------------------------------------------------
140 //--------------------------------------------------------------------------------------------------
142 
143 
144 //--------------------------------------------------------------------------------------------------
151 //--------------------------------------------------------------------------------------------------
153 (
154  le_clk_Time_t timeA,
155  le_clk_Time_t timeB
156 );
157 
158 
159 //--------------------------------------------------------------------------------------------------
167 //--------------------------------------------------------------------------------------------------
169 (
170  le_clk_Time_t timeA,
171  le_clk_Time_t timeB
172 );
173 
174 
175 //--------------------------------------------------------------------------------------------------
182 //--------------------------------------------------------------------------------------------------
184 (
185  le_clk_Time_t timeA,
186  le_clk_Time_t timeB
187 );
188 
189 
190 //--------------------------------------------------------------------------------------------------
197 //--------------------------------------------------------------------------------------------------
199 (
200  le_clk_Time_t timeA,
201  int scaleFactor
202 );
203 
204 
205 //--------------------------------------------------------------------------------------------------
221 //--------------------------------------------------------------------------------------------------
223 (
224  const char* formatSpecStrPtr,
225  char* destStrPtr,
227  size_t destSize,
228  size_t* numBytesPtr
229 
232 );
233 
234 
235 //--------------------------------------------------------------------------------------------------
251 //--------------------------------------------------------------------------------------------------
253 (
254  const char* formatSpecStrPtr,
255  char* destStrPtr,
257  size_t destSize,
258  size_t* numBytesPtr
259 );
262 
263 
264 //--------------------------------------------------------------------------------------------------
281 //--------------------------------------------------------------------------------------------------
283 (
284  le_clk_Time_t time,
285  const char* formatSpecStrPtr,
286  char* destStrPtr,
288  size_t destSize,
289  size_t* numBytesPtr
290 
293 );
294 
295 
296 //--------------------------------------------------------------------------------------------------
312 //--------------------------------------------------------------------------------------------------
314 (
315  le_clk_Time_t time,
316  const char* formatSpecStrPtr,
317  char* destStrPtr,
319  size_t destSize,
320  size_t* numBytesPtr
321 
324 );
325 
326 #endif // LEGATO_CLK_INCLUDE_GUARD
327 
le_result_t le_clk_GetLocalDateTimeString(const char *formatSpecStrPtr, char *destStrPtr, size_t destSize, size_t *numBytesPtr)
bool le_clk_GreaterThan(le_clk_Time_t timeA, le_clk_Time_t timeB)
le_result_t
Definition: le_basics.h:35
le_result_t le_clk_GetUTCDateTimeString(const char *formatSpecStrPtr, char *destStrPtr, size_t destSize, size_t *numBytesPtr)
long usec
microseconds
Definition: le_clock.h:95
time_t sec
seconds
Definition: le_clock.h:94
le_clk_Time_t le_clk_Sub(le_clk_Time_t timeA, le_clk_Time_t timeB)
le_clk_Time_t le_clk_GetAbsoluteTime(void)
le_result_t le_clk_ConvertToUTCString(le_clk_Time_t time, const char *formatSpecStrPtr, char *destStrPtr, size_t destSize, size_t *numBytesPtr)
Definition: le_clock.h:92
le_clk_Time_t le_clk_Multiply(le_clk_Time_t timeA, int scaleFactor)
le_result_t le_clk_ConvertToLocalTimeString(le_clk_Time_t time, const char *formatSpecStrPtr, char *destStrPtr, size_t destSize, size_t *numBytesPtr)
le_clk_Time_t le_clk_Add(le_clk_Time_t timeA, le_clk_Time_t timeB)
le_clk_Time_t le_clk_GetRelativeTime(void)