X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fdb-test.c;h=9a6f3bb6264e19620970226474d15ab85d7bb083;hb=e6f42d16d3278e709f23825944598769539368e5;hp=dabbbaa7a22803131ab358a53363ca0de4fa3ec7;hpb=1571781022499a9d0c32d249f89945d034d1cbff;p=libucw.git diff --git a/lib/db-test.c b/lib/db-test.c index dabbbaa7..9a6f3bb6 100644 --- a/lib/db-test.c +++ b/lib/db-test.c @@ -1,7 +1,10 @@ /* - * Sherlock Library -- Database Manager -- Tests and Benchmarks + * UCW Library -- Database Manager -- Tests and Benchmarks * * (c) 1999 Martin Mares + * + * This software may be freely distributed and used according to the terms + * of the GNU Lesser General Public License. */ #if 1 @@ -12,7 +15,7 @@ #define NAME "GDBM" #endif -#include +#include #include #include #include @@ -259,8 +262,9 @@ int main(int argc, char **argv) uns ks, vs, vs2, perc, cnt; char *ch; int dont_delete = 0; + timestamp_t timer; - initlog("dbtest"); + log_init("dbtest"); setvbuf(stdout, NULL, _IONBF, 0); setvbuf(stderr, NULL, _IONBF, 0); while ((c = getopt(argc, argv, "c:p:k:n:d:vsStF")) >= 0) @@ -330,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': @@ -456,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");