diff options
| author | Jason Evans <jasone@canonware.com> | 2016-06-08 18:41:24 (GMT) |
|---|---|---|
| committer | Jason Evans <jasone@canonware.com> | 2016-06-08 18:41:24 (GMT) |
| commit | 3de035335255d553bdb344c32ffdb603816195d8 (patch) | |
| tree | 24896f5754301439fbfd4c280c71e46e5c830207 /src/nstime.c | |
| parent | f70a254d44c8d30af2cd5d30531fb18fdabaae6d (diff) | |
| parent | 5271b673b2e93dd655fde6f2ee1ea849da5cb3d2 (diff) | |
| download | jemalloc-4.2.1.zip jemalloc-4.2.1.tar.gz jemalloc-4.2.1.tar.bz2 | |
Merge branch.4.2.1
Diffstat (limited to 'src/nstime.c')
| -rw-r--r-- | src/nstime.c | 8 |
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. */ |
