|
@@ -3531,14 +3531,14 @@ START_TEST(test_throttle)
|
|
dt = difftime(t1, t0) * 1000.0; /* Elapsed time in ms - in most systems
|
|
dt = difftime(t1, t0) * 1000.0; /* Elapsed time in ms - in most systems
|
|
* only with second resolution */
|
|
* only with second resolution */
|
|
|
|
|
|
- /* Time estimation: Data size is 10 kB, with 1 kB/s speed limit.
|
|
|
|
- * The first block (1st kB) is transferred immediately, the second
|
|
|
|
- * block (2nd kB) one second later, the third block (3rd kB) two
|
|
|
|
- * seconds later, .. the last block (10th kB) nine seconds later.
|
|
|
|
- * The resolution of time measurement using the "time" C library
|
|
|
|
- * function is 1 second, so we should add +/- one second tolerance.
|
|
|
|
- * Thus, download of 10 kB with 1 kB/s should not be faster than
|
|
|
|
- * 8 seconds. */
|
|
|
|
|
|
+ /* Time estimation: Data size is 10 kB, with 1 kB/s speed limit.
|
|
|
|
+ * The first block (1st kB) is transferred immediately, the second
|
|
|
|
+ * block (2nd kB) one second later, the third block (3rd kB) two
|
|
|
|
+ * seconds later, .. the last block (10th kB) nine seconds later.
|
|
|
|
+ * The resolution of time measurement using the "time" C library
|
|
|
|
+ * function is 1 second, so we should add +/- one second tolerance.
|
|
|
|
+ * Thus, download of 10 kB with 1 kB/s should not be faster than
|
|
|
|
+ * 8 seconds. */
|
|
|
|
|
|
/* Check if there are at least 8 seconds */
|
|
/* Check if there are at least 8 seconds */
|
|
ck_assert_int_ge((int)dt, 8 * 1000);
|
|
ck_assert_int_ge((int)dt, 8 * 1000);
|