diff options
Diffstat (limited to 'src/pdclib/platform/stmos/functions/time/time.c')
-rw-r--r-- | src/pdclib/platform/stmos/functions/time/time.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/pdclib/platform/stmos/functions/time/time.c b/src/pdclib/platform/stmos/functions/time/time.c index cbb29e1..814c925 100644 --- a/src/pdclib/platform/stmos/functions/time/time.c +++ b/src/pdclib/platform/stmos/functions/time/time.c @@ -8,22 +8,16 @@ #ifndef REGTEST -#include <sys/time.h> +#include <syscalls.h> /* See comments in time.h on the semantics of time_t. */ time_t time( time_t * timer ) { - struct timeval tv; - if ( gettimeofday( &tv, NULL ) == 0 ) - { - if ( timer != NULL ) - { - *timer = tv.tv_sec; - } - return tv.tv_sec; - } - return -1; + if ( timer != NULL ) + *timer = ticks(); + + return ticks(); } #endif |