X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Ftst_timing.c;h=f7f20fc47a2f7d414fad732827d4d27bf5d160e2;hb=8526300b58a12ecbb6e48b320839e28e4460a925;hp=43e62ff6a0594da8c7d970823bb975d755e6d78a;hpb=e1000eb6be4e847ac7d1099c5b919a0732276a9a;p=yaz-moved-to-github.git diff --git a/test/tst_timing.c b/test/tst_timing.c index 43e62ff..f7f20fc 100644 --- a/test/tst_timing.c +++ b/test/tst_timing.c @@ -1,8 +1,6 @@ -/* - * Copyright (C) 1995-2007, Index Data ApS +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2008 Index Data * See the file LICENSE for details. - * - * $Id: tst_timing.c,v 1.2 2007-01-05 12:40:05 adam Exp $ */ #include @@ -20,19 +18,21 @@ static void tst(void) yaz_timing_t t = yaz_timing_create(); double real, user, sys; int i = 0; + double x = 0; YAZ_CHECK(t); if (!t) return; #ifdef WIN32 - Sleep(100); + Sleep(10); #endif - for (i = 0; i<100000; i++) - ; + for (i = 0; i<5000000; i++) + x += i; - YAZ_CHECK_EQ(i, 100000); + YAZ_CHECK_EQ(i, 5000000); + yaz_log(YLOG_LOG, "i=%d x=%f", i, x); yaz_timing_stop(t); real = yaz_timing_get_real(t);