summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/times.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/times.cc')
-rw-r--r--winsup/cygwin/times.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc
index 39fc6546a..f6f23bbbb 100644
--- a/winsup/cygwin/times.cc
+++ b/winsup/cygwin/times.cc
@@ -28,6 +28,8 @@ details. */
#define FACTOR (0x19db1ded53e8000LL)
#define NSPERSEC 10000000LL
+hires_ms NO_COPY gtod;
+
static inline LONGLONG
systime_ns ()
{
@@ -116,6 +118,7 @@ settimeofday (const struct timeval *tv, const struct timezone *tz)
st.wMilliseconds = tv->tv_usec / 1000;
res = !SetSystemTime (&st);
+ gtod.reset ();
syscall_printf ("%d = settimeofday (%x, %x)", res, tv, tz);
@@ -146,8 +149,6 @@ totimeval (struct timeval *dst, FILETIME *src, int sub, int flag)
dst->tv_sec = x / (long long) (1e6);
}
-hires_ms NO_COPY gtod;
-
/* FIXME: Make thread safe */
extern "C" int
gettimeofday (struct timeval *tv, void *tzvp)