]> mj.ucw.cz Git - libucw.git/blobdiff - lib/asort-test.c
Merge with git+ssh://cvs.ucw.cz/projects/sherlock/GIT/sherlock.git#v3.11
[libucw.git] / lib / asort-test.c
index e20854237949f5d7c0d65074c8f301d57662b14a..9c6abd47dcd7496cf6153e28d332de0bc487865e 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- *     Sherlock Library -- Universal Array Sorter Test and Benchmark
+ *     UCW Library -- Universal Array Sorter Test and Benchmark
  *
  *     (c) 2003 Martin Mares <mj@ucw.cz>
  *
  *
  *     (c) 2003 Martin Mares <mj@ucw.cz>
  *
@@ -61,15 +61,17 @@ static int qs_comp(const struct elt *X, const struct elt *Y)
 
 int main(void)
 {
 
 int main(void)
 {
+  timestamp_t timer;
+
   generate();
   generate();
-  init_timer();
+  init_timer(&timer);
   qsort(array, N, sizeof(array[0]), (int (*)(const void *, const void *)) qs_comp);
   qsort(array, N, sizeof(array[0]), (int (*)(const void *, const void *)) qs_comp);
-  printf("qsort: %d ms\n", get_timer());
+  printf("qsort: %d ms\n", get_timer(&timer));
   check();
   generate();
   check();
   generate();
-  init_timer();
-  as_sort(N);  
-  printf("asort: %d ms\n", get_timer());
+  init_timer(&timer);
+  as_sort(N);
+  printf("asort: %d ms\n", get_timer(&timer));
   check();
   return 0;
 }
   check();
   return 0;
 }