2 lib clock_settime,gettimeofday,settimeofday,stime,utimes
4 lib utimensat -D_ATFILE_SOURCE sys/stat.h note{ complete utimensat implementation }end link{
6 static struct timespec ts[2];
10 ts[0].tv_nsec = UTIME_NOW;
11 ts[1].tv_nsec = UTIME_OMIT;
12 return utimensat(AT_FDCWD, ".", ts, AT_SYMLINK_NOFOLLOW) != 0;
16 if ! mem timeval.tv_sec sys/time.h {
25 lib clock_gettime execute{
31 return clock_gettime(CLOCK_REALTIME, &tv) != 0;
38 static struct timespec tv;
42 return utimets(".", &tv) != 0;
46 tst - -DN=1 - -DN=2 - -DN=3 - -DN=4 output{
47 #include <sys/types.h>
55 if (gettimeofday(&tv, (struct timezone*)0) < 0)
57 printf("#define tmgettimeofday(p) gettimeofday(p,(struct timezone*)0)\n");
59 printf("#define tmsettimeofday(p) settimeofday(p,(struct timezone*)0)\n");
63 if (gettimeofday(&tv, (void*)0) < 0)
65 printf("#define tmgettimeofday(p) gettimeofday(p,(void*)0)\n");
67 printf("#define tmsettimeofday(p) gettimeofday(p,(void*)0)\n");
71 if (gettimeofday(&tv) < 0)
73 printf("#define tmgettimeofday(p) gettimeofday(p)\n");
75 printf("#define tmsettimeofday(p) settimeofday(p)\n");