Declare variables first

This commit is contained in:
Bert Belder 2011-06-17 22:37:12 +02:00
parent 608917a00f
commit debae03771

View File

@ -24,11 +24,13 @@
TEST_IMPL(hrtime) {
uint64_t a = uv_get_hrtime();
uv_sleep(1);
uint64_t b = uv_get_hrtime();
uint64_t a, b, diff;
uint64_t diff = b - a;
a = uv_get_hrtime();
uv_sleep(1);
b = uv_get_hrtime();
diff = b - a;
printf("diff = %llu\n", diff);
ASSERT(b - a >= NANOSEC / MILLISEC);