]> mj.ucw.cz Git - libucw.git/blobdiff - lib/sorter/sort-test.c
Added a couple of tests with the old sorter to have reference for speed benchmarks.
[libucw.git] / lib / sorter / sort-test.c
index 2909599f838d64e245c4126283e7aba70a7331c9..5464f744fd1eb226d2af7df4a82d8b43805021fb 100644 (file)
 #include <stdio.h>
 #include <string.h>
 #include <fcntl.h>
+#include <unistd.h>
 
 /*** Time measurement ***/
 
 static void
 start(void)
 {
+  sync();
   init_timer();
 }
 
 static void
 stop(void)
 {
+  sync();
   log(L_INFO, "Test took %.3fs", get_timer() / 1000.);
 }