diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-12-16 21:19:30 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-12-16 21:19:30 +0100 |
commit | 10f1958417a4944a60a08230eae6a639209d52f8 (patch) | |
tree | 7662166d1cf40507e65fba6dbb9ee73a7c652afc /sysdeps/generic/memusage.h | |
parent | 963c37d5c0eb62b38f8764b23931c0dcdd497a13 (diff) | |
parent | a2e487ce1c59d19345d9ecacc58de79febd869e4 (diff) |
Merge branch 'master' of git://sourceware.org/git/glibc into upstreamupstream
Diffstat (limited to 'sysdeps/generic/memusage.h')
-rw-r--r-- | sysdeps/generic/memusage.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sysdeps/generic/memusage.h b/sysdeps/generic/memusage.h index 2887ff1be3..88b291e3fa 100644 --- a/sysdeps/generic/memusage.h +++ b/sysdeps/generic/memusage.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2018 Free Software Foundation, Inc. +/* Copyright (C) 2000-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <limits.h> @@ -26,14 +26,14 @@ #endif #ifndef GETTIME -# define GETTIME(low,high) \ - { \ - struct timeval tval; \ - uint64_t usecs; \ - gettimeofday (&tval, NULL); \ - usecs = (uint64_t) tval.tv_usec + (uint64_t) tval.tv_usec * 1000000; \ - low = usecs & 0xffffffff; \ - high = usecs >> 32; \ +# define GETTIME(low,high) \ + { \ + struct timespec now; \ + uint64_t usecs; \ + clock_gettime (CLOCK_REALTIME, &now); \ + usecs = (uint64_t)now.tv_nsec / 1000 + (uint64_t)now.tv_sec * 1000000; \ + low = usecs & 0xffffffff; \ + high = usecs >> 32; \ } #endif |