]> mj.ucw.cz Git - libucw.git/blobdiff - lib/db-test.c
Merge with git+ssh://git.ucw.cz/projects/sherlock/GIT/sherlock.git#v3.11
[libucw.git] / lib / db-test.c
index b00bead72f416da1628597117bfd1b3258360a93..9a6f3bb6264e19620970226474d15ab85d7bb083 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *     Sherlock Library -- Database Manager -- Tests and Benchmarks
+ *     UCW Library -- Database Manager -- Tests and Benchmarks
  *
  *     (c) 1999 Martin Mares <mj@ucw.cz>
  *
@@ -15,7 +15,7 @@
 #define NAME "GDBM"
 #endif
 
-#include <getopt.h>
+#include <stdlib.h>
 #include <unistd.h>
 #include <stdarg.h>
 #include <sys/stat.h>
@@ -262,6 +262,7 @@ int main(int argc, char **argv)
   uns ks, vs, vs2, perc, cnt;
   char *ch;
   int dont_delete = 0;
+  timestamp_t timer;
 
   log_init("dbtest");
   setvbuf(stdout, NULL, _IONBF, 0);
@@ -333,7 +334,7 @@ int main(int argc, char **argv)
   while (optind < argc)
     {
       char *o = argv[optind++];
-      init_timer();
+      init_timer(&timer);
       switch (*o)
        {
        case 'c':
@@ -459,7 +460,7 @@ int main(int argc, char **argv)
          help();
        }
       sdbm_sync(d);
-      printf("%d ms\n", get_timer());
+      printf("%d ms\n", get_timer(&timer));
     }
 
   verb("CLOSE\n");