X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fgettime.c;h=d60711b533516fe3729225310e063dc0b2ec65e1;hb=ed664fa4ea5bdee8952dbcdf614b87303b8f67a1;hp=0f94297da880cf3ac736bf539e0ab28a5b972cc8;hpb=267a39bafd249d7eb9c37df06dc6defcf41cb343;p=gnulib.git diff --git a/lib/gettime.c b/lib/gettime.c index 0f94297da..d60711b53 100644 --- a/lib/gettime.c +++ b/lib/gettime.c @@ -45,8 +45,14 @@ gettime (struct timespec *ts) ts->tv_nsec = tv.tv_usec * 1000; } # else + +# ifndef OK_TO_USE_1S_CLOCK +# error "Only 1-second nominal clock resolution found. Is that intended?" \ + "If so, compile with the -DOK_TO_USE_1S_CLOCK option." +# endif ts->tv_sec = time (NULL); ts->tv_nsec = 0; + # endif #endif