Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | #include "platform.h" |
2 | ||
3 | C_Int_t Time_getTimeOfDay (Ref(C_Time_t) sec, Ref(C_SUSeconds_t) usec) { | |
4 | struct timeval timeval; | |
5 | int res; | |
6 | res = gettimeofday (&timeval, (struct timezone*)NULL); | |
7 | if (! res) { | |
8 | *((C_Time_t*)sec) = timeval.tv_sec; | |
9 | *((C_SUSeconds_t*)usec) = timeval.tv_usec; | |
10 | } | |
11 | return res; | |
12 | } |