Lely core libraries  2.2.5
time.c
Go to the documentation of this file.
1 
23 #include "libc.h"
24 
25 #if !LELY_NO_RT
26 
27 #include <lely/libc/time.h>
28 
29 #if !LELY_HAVE_TIMESPEC_GET
30 
31 int
32 timespec_get(struct timespec *ts, int base)
33 {
34  if (base != TIME_UTC || clock_gettime(CLOCK_REALTIME, ts) == -1)
35  return 0;
36  return base;
37 }
38 
39 #endif // !LELY_HAVE_TIMESPEC_GET
40 
41 #endif // !LELY_NO_RT
time.h
libc.h
timespec_get
int timespec_get(struct timespec *ts, int base)
Sets the interval at ts to hold the current calendar time based on the specified time base.
Definition: time.c:32