X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgettime.c;h=d60711b533516fe3729225310e063dc0b2ec65e1;hb=ed664fa4ea5bdee8952dbcdf614b87303b8f67a1;hp=929dece315e2400c6067c7df0b7bd7b3b7259abc;hpb=10ce26c08f4e8ffe6ac636b1fec6a33a847b0d3a;p=gnulib.git diff --git a/lib/gettime.c b/lib/gettime.c index 929dece31..d60711b53 100644 --- a/lib/gettime.c +++ b/lib/gettime.c @@ -13,7 +13,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Paul Eggert. */ @@ -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