1
0
mirror of git://sigrok.org/libserialport synced 2023-08-10 21:13:24 +03:00

Relax timing test in the other direction.

On my test system under MSYS (Cygwin64), a period of 991ms was
measured after a sleep of 1s.
This commit is contained in:
Martin Ling 2020-01-25 14:54:39 +00:00 committed by Uwe Hermann
parent 2be41b1265
commit fb58f12ee9

View File

@ -29,7 +29,7 @@ int main(int argc, char *argv[])
time_get(&b); time_get(&b);
time_sub(&b, &a, &c); time_sub(&b, &a, &c);
printf("Measured: %ums\n", time_as_ms(&c)); printf("Measured: %ums\n", time_as_ms(&c));
assert(time_as_ms(&c) >= 999); assert(time_as_ms(&c) >= 950);
assert(time_as_ms(&c) <= 1050); assert(time_as_ms(&c) <= 1050);
printf("Starting 3s timeout\n"); printf("Starting 3s timeout\n");
timeout_start(&to, 3000); timeout_start(&to, 3000);