summaryrefslogtreecommitdiffstats
path: root/contrib/jemalloc/src/nstime.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/jemalloc/src/nstime.c')
-rw-r--r--contrib/jemalloc/src/nstime.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/jemalloc/src/nstime.c b/contrib/jemalloc/src/nstime.c
index 26e49dc..aad2c26 100644
--- a/contrib/jemalloc/src/nstime.c
+++ b/contrib/jemalloc/src/nstime.c
@@ -128,9 +128,11 @@ nstime_update(nstime_t *time)
time->ns = ts.tv_sec * BILLION + ts.tv_nsec;
}
#else
- struct timeval tv;
- gettimeofday(&tv, NULL);
- time->ns = tv.tv_sec * BILLION + tv.tv_usec * 1000;
+ {
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ time->ns = tv.tv_sec * BILLION + tv.tv_usec * 1000;
+ }
#endif
/* Handle non-monotonic clocks. */
OpenPOWER on IntegriCloud