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
Special value -1.0 means 'could not get timings' on current platform.
[yaz-moved-to-github.git]
/
src
/
timing.c
diff --git
a/src/timing.c
b/src/timing.c
index
6957bc9
..
31f1095
100644
(file)
--- a/
src/timing.c
+++ b/
src/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: timing.c,v 1.1 2007-01-03 13:46:18 adam Exp $
+ * $Id: timing.c,v 1.2 2007-01-05 11:44:49 adam Exp $
*/
/**
*/
/**
@@
-48,20
+48,22
@@
void yaz_timing_start(yaz_timing_t t)
{
#if HAVE_SYS_TIMES_H
times(&t->tms1);
{
#if HAVE_SYS_TIMES_H
times(&t->tms1);
+ t->user_sec = 0.0;
+ t->sys_sec = 0.0;
+#else
+ t->user_sec = -1.0;
+ t->sys_sec = -1.0;
#endif
#if HAVE_SYS_TIME_H
gettimeofday(&t->start_time, 0);
#endif
#if HAVE_SYS_TIME_H
gettimeofday(&t->start_time, 0);
-#endif
+ t->real_sec = 0.0;
+#else
t->real_sec = -1.0;
t->real_sec = -1.0;
- t->user_sec = -1.0;
- t->sys_sec = -1.0;
+#endif
}
void yaz_timing_stop(yaz_timing_t t)
{
}
void yaz_timing_stop(yaz_timing_t t)
{
- t->real_sec = 0.0;
- t->user_sec = 0.0;
- t->sys_sec = 0.0;
#if HAVE_SYS_TIMES_H
times(&t->tms2);
#if HAVE_SYS_TIMES_H
times(&t->tms2);