projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eac6b7e
)
Use casts rather than floor(3)
author
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 11 Oct 2010 10:50:47 +0000
(12:50 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 11 Oct 2010 10:50:47 +0000
(12:50 +0200)
ztest/ztest.c
patch
|
blob
|
history
diff --git
a/ztest/ztest.c
b/ztest/ztest.c
index
c4e7b49
..
2ef8921
100644
(file)
--- a/
ztest/ztest.c
+++ b/
ztest/ztest.c
@@
-210,8
+210,8
@@
static void ztest_sleep(double d)
Sleep( (DWORD) (d * 1000));
#else
struct timeval tv;
- tv.tv_sec = floor(d);
- tv.tv_usec = (d - floor(d)) * 1000000;
+ tv.tv_sec = d;
+ tv.tv_usec = (d - (long) d) * 1000000;
select(0, 0, 0, 0, &tv);
#endif
}