summaryrefslogtreecommitdiff
path: root/source4/torture/nbench
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2010-09-16 21:36:37 +0200
committerBjörn Jacke <bj@sernet.de>2010-09-16 21:38:20 +0200
commit2b254c814b139f93997f61525d77b934596c53a3 (patch)
tree945897a1c52a9d6d8f5958f47b6c8b4a877d7164 /source4/torture/nbench
parent0fd16018a1c993166eae72390433398347538a81 (diff)
downloadsamba-2b254c814b139f93997f61525d77b934596c53a3.tar.gz
samba-2b254c814b139f93997f61525d77b934596c53a3.tar.bz2
samba-2b254c814b139f93997f61525d77b934596c53a3.zip
s3/s4: merge msleep and smb_msleep
the merged variant is renamed to smb_msleep as some platforms already have a msleep function.
Diffstat (limited to 'source4/torture/nbench')
-rw-r--r--source4/torture/nbench/nbio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/torture/nbench/nbio.c b/source4/torture/nbench/nbio.c
index fa8155e2c3..ca186d007b 100644
--- a/source4/torture/nbench/nbio.c
+++ b/source4/torture/nbench/nbio.c
@@ -192,7 +192,7 @@ void nbio_target_rate(double rate)
tdelay = (children[nbio_id].bytes - last_bytes)/(1.0e6*rate) - timeval_elapsed(&last_time);
if (tdelay > 0) {
- msleep(tdelay*1000);
+ smb_msleep(tdelay*1000);
} else {
children[nbio_id].max_latency = MAX(children[nbio_id].max_latency, -tdelay);
}
@@ -210,7 +210,7 @@ void nbio_time_delay(double targett)
{
double elapsed = timeval_elapsed(&children[nbio_id].starttime);
if (targett > elapsed) {
- msleep(1000*(targett - elapsed));
+ smb_msleep(1000*(targett - elapsed));
} else if (elapsed - targett > children[nbio_id].max_latency) {
children[nbio_id].max_latency = MAX(elapsed - targett, children[nbio_id].max_latency);
}