projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More wrbuf_buf woes.
[yaz-moved-to-github.git]
/
test
/
tst_timing.c
diff --git
a/test/tst_timing.c
b/test/tst_timing.c
index
c02f03c
..
84d19be
100644
(file)
--- a/
test/tst_timing.c
+++ b/
test/tst_timing.c
@@
-2,7
+2,7
@@
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: tst_timing.c,v 1.1 2007-01-05 11:45:11 adam Exp $
+ * $Id: tst_timing.c,v 1.3 2007-01-05 14:05:55 adam Exp $
*/
#include <stdlib.h>
*/
#include <stdlib.h>
@@
-11,22
+11,30
@@
#include <yaz/timing.h>
#include <yaz/test.h>
#include <yaz/log.h>
#include <yaz/timing.h>
#include <yaz/test.h>
#include <yaz/log.h>
+#ifdef WIN32
+#include <windows.h>
+#endif
static void tst(void)
{
yaz_timing_t t = yaz_timing_create();
double real, user, sys;
int i = 0;
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;
YAZ_CHECK(t);
if (!t)
return;
- for (i = 0; i<100000; i++)
- ;
+#ifdef WIN32
+ Sleep(10);
+#endif
+ 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);
yaz_timing_stop(t);
real = yaz_timing_get_real(t);