aboutsummaryrefslogtreecommitdiff
path: root/src/test/bench.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-09-15 16:24:44 -0400
committerNick Mathewson <nickm@torproject.org>2017-09-15 16:24:44 -0400
commitc1deabd3b0c9e2701696afc80ac8392f0efda2c7 (patch)
treee9aa0dcc25f1687fac2d2de764c22693c75e20cf /src/test/bench.c
parent7a597718bb9cda3dd553c2b12fd42f04ead44c85 (diff)
downloadtor-c1deabd3b0c9e2701696afc80ac8392f0efda2c7.tar.gz
tor-c1deabd3b0c9e2701696afc80ac8392f0efda2c7.zip
Run our #else/#endif annotator on our source code.
Diffstat (limited to 'src/test/bench.c')
-rw-r--r--src/test/bench.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/bench.c b/src/test/bench.c
index a44dc94a61..718c0b9038 100644
--- a/src/test/bench.c
+++ b/src/test/bench.c
@@ -58,7 +58,7 @@ perftime(void)
return timespec_to_nsec(&ts) - nanostart;
}
-#else
+#else /* !(defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_PROCESS_CPUTIME_ID)) */
static struct timeval tv_start = { 0, 0 };
static void
reset_perftime(void)
@@ -73,7 +73,7 @@ perftime(void)
timersub(&now, &tv_start, &out);
return ((uint64_t)out.tv_sec)*1000000000 + out.tv_usec*1000;
}
-#endif
+#endif /* defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_PROCESS_CPUTIME_ID) */
#define NANOCOUNT(start,end,iters) \
( ((double)((end)-(start))) / (iters) )