From: Martin Ling Date: Fri, 24 Jan 2020 08:02:36 +0000 (+0000) Subject: Relax timing test because it's too tight for Windows. X-Git-Tag: libserialport-0.1.2~32 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f6abee5c78b1d4d7bcfd8bd08bd57baa5f011ba2;p=libserialport.git Relax timing test because it's too tight for Windows. On my test system, a delay of 1016ms was measured after a sleep of 1000ms. --- diff --git a/test_timing.c b/test_timing.c index c08badb..e3e8ec0 100644 --- a/test_timing.c +++ b/test_timing.c @@ -30,7 +30,7 @@ int main(int argc, char *argv[]) time_sub(&b, &a, &c); printf("Measured: %ums\n", time_as_ms(&c)); assert(time_as_ms(&c) >= 999); - assert(time_as_ms(&c) <= 1001); + assert(time_as_ms(&c) <= 1050); printf("Starting 3s timeout\n"); timeout_start(&to, 3000); printf("Time to wait: %dms\n", timeout_remaining_ms(&to));