r23534: honour the targetrate even for loadfiles with timestamps
authorAndrew Tridgell <tridge@samba.org>
Sun, 17 Jun 2007 20:04:57 +0000 (20:04 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:53:25 +0000 (14:53 -0500)
(This used to be commit 24b6aabd11849518f46231358994118a39bb0cb3)

source4/torture/nbench/nbench.c

index f14da8cd15ccc70d874b82270f1f8aa9377544d5..b55998e43fd0d8369e43954b23bb0924bc195002 100644 (file)
@@ -88,7 +88,11 @@ again:
 
                if (i > 0 && isdigit(params[0][0])) {
                        double targett = strtod(params[0], NULL);
-                       nbio_time_delay(targett);
+                       if (target_rate != 0) {
+                               nbio_target_rate(target_rate);
+                       } else {
+                               nbio_time_delay(targett);
+                       }
                        params++;
                        i--;
                } else if (target_rate != 0) {