1 /* timespec_get( struct timespec *, int )
3 This file is part of the Public Domain C Library (PDCLib).
4 Permission is granted to use, modify, and / or redistribute at will.
13 int timespec_get( struct timespec * ts, int base )
15 if ( base == TIME_UTC )
17 /* We can make do with a really thin wrapper here. */
19 if ( gettimeofday( &tv, NULL ) == 0 )
21 ts->tv_sec = tv.tv_sec;
22 ts->tv_nsec = tv.tv_usec * 1000;
26 /* Not supporting any other time base than TIME_UTC for now. */
34 #include "_PDCLIB_test.h"
38 TESTCASE( NO_TESTDRIVER );