diff options
Diffstat (limited to 'gl/lib/gettime.c')
-rw-r--r-- | gl/lib/gettime.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gl/lib/gettime.c b/gl/lib/gettime.c index f5b8ca53..541af18b 100644 --- a/gl/lib/gettime.c +++ b/gl/lib/gettime.c @@ -1,18 +1,18 @@ /* gettime -- get the system clock - Copyright (C) 2002, 2004-2007, 2009-2020 Free Software Foundation, Inc. + Copyright (C) 2002, 2004-2007, 2009-2022 Free Software Foundation, Inc. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. */ /* Written by Paul Eggert. */ @@ -30,6 +30,8 @@ gettime (struct timespec *ts) { #if defined CLOCK_REALTIME && HAVE_CLOCK_GETTIME clock_gettime (CLOCK_REALTIME, ts); +#elif defined HAVE_TIMESPEC_GET + timespec_get (ts, TIME_UTC); #else struct timeval tv; gettimeofday (&tv, NULL); |