diff options
author | Bobby Bingham <koorogi@koorogi.info> | 2014-06-28 22:55:16 -0500 |
---|---|---|
committer | Bobby Bingham <koorogi@koorogi.info> | 2014-06-29 12:10:20 -0500 |
commit | 76e03ea9b71186cf6a67d801590b12c531a1e78a (patch) | |
tree | a33e6a59acee3da6ded86df8fd99a463741da95f /bench.c | |
parent | 92b07de2d70460f1911597118f3fac2612ccdf4c (diff) |
Move assert_sorted helper somewhere more public
Diffstat (limited to 'bench.c')
-rw-r--r-- | bench.c | 10 |
1 files changed, 0 insertions, 10 deletions
@@ -37,16 +37,6 @@ static inline unsigned long timediff_ms(struct timespec *start, struct timespec return 1000 * (stop->tv_sec - start->tv_sec) + (stop->tv_nsec - start->tv_nsec) / 1000000; } -static inline void assert_sorted(int *buffer, size_t size) -{ - if (!size) return; - int prev = buffer[0]; - for (size_t i = 1; i < size; i++) { - if (prev > buffer[i]) abort(); - prev = buffer[i]; - } -} - int main() { struct timespec start, stop; |