trysettimeofday.c (349B)
1 /* ISC license. */ 2 3 #undef _POSIX_C_SOURCE 4 #undef _XOPEN_SOURCE 5 6 #ifndef _BSD_SOURCE 7 #define _BSD_SOURCE 8 #endif 9 10 #ifndef _NETBSD_SOURCE 11 #define _NETBSD_SOURCE 12 #endif 13 14 #ifndef __EXTENSIONS__ 15 #define __EXTENSIONS__ 16 #endif 17 18 #include <sys/time.h> 19 20 int main (void) 21 { 22 struct timeval tv ; 23 gettimeofday(&tv, 0) ; 24 settimeofday(&tv, 0) ; 25 return 0 ; 26 }