Home
time.c - scc - simple c99 compiler HTML git clone git://git.simple-cc.org/scc DIR Log DIR Files DIR Refs DIR Submodules DIR README DIR LICENSE --- time.c (242B) --- 1 #include <time.h> 2 3 #include "time.h" 4 5 extern int _gettimeofday(struct timeval *restrict, void *); 6 7 time_t 8 time(time_t *t) 9 { 10 struct timeval tv; 11 12 if (_gettimeofday(&tv, NULL) == -1) 13 return -1; 14 if (t) 15 *t = tv.tv_sec; 16 return tv.tv_sec; 17 }