Skip to content

Commit 48384dc

Browse files
ronawhojasone
authored andcommitted
Fix mixed decl in nstime.c
Fix mixed decl in the gettimeofday() branch of nstime_update()
1 parent 09d7bdb commit 48384dc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/nstime.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,11 @@ nstime_update(nstime_t *time)
128128
time->ns = ts.tv_sec * BILLION + ts.tv_nsec;
129129
}
130130
#else
131-
struct timeval tv;
132-
gettimeofday(&tv, NULL);
133-
time->ns = tv.tv_sec * BILLION + tv.tv_usec * 1000;
131+
{
132+
struct timeval tv;
133+
gettimeofday(&tv, NULL);
134+
time->ns = tv.tv_sec * BILLION + tv.tv_usec * 1000;
135+
}
134136
#endif
135137

136138
/* Handle non-monotonic clocks. */

0 commit comments

Comments
 (0)