summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorElliot Ronaghan <ronawho@gmail.com>2016-05-27 23:20:23 (GMT)
committerJason Evans <jasone@canonware.com>2016-06-07 21:03:27 (GMT)
commitde23f6fce7fa49b3ac9c1a6e36131464ecce2f01 (patch)
tree2796995d29ada1f4912e107c237d73abfde0b77f /src
parentcc289f40b6e7b119566abf8a1c09c97e08597a3d (diff)
downloadjemalloc-de23f6fce7fa49b3ac9c1a6e36131464ecce2f01.zip
jemalloc-de23f6fce7fa49b3ac9c1a6e36131464ecce2f01.tar.gz
jemalloc-de23f6fce7fa49b3ac9c1a6e36131464ecce2f01.tar.bz2
Fix mixed decl in nstime.c
Fix mixed decl in the gettimeofday() branch of nstime_update()
Diffstat (limited to 'src')
-rw-r--r--src/nstime.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nstime.c b/src/nstime.c
index 26e49dc..aad2c26 100644
--- a/src/nstime.c
+++ b/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. */