Skip to content
Snippets Groups Projects
Commit 52040027 authored by Marek Vavrusa's avatar Marek Vavrusa
Browse files

Increased evsched time limits to a safe margin.

parent 9448980b
No related branches found
No related tags found
No related merge requests found
......@@ -124,7 +124,7 @@ static int events_tests_run(int argc, char *argv[])
ok(s != 0, "evsched: new");
// 2. Schedule event to happen after N ms
int msecs = 50;
int msecs = 200;
struct timeval st, rt;
gettimeofday(&st, 0);
e = evsched_schedule_cb(s, 0, (void*)0xcafe, msecs);
......@@ -139,7 +139,7 @@ static int events_tests_run(int argc, char *argv[])
// 4. Check receive time
double passed = (rt.tv_sec - st.tv_sec) * 1000;
passed += (rt.tv_usec - st.tv_usec) / 1000;
double margin = msecs * 0.2;
double margin = msecs * 0.4;
double lb = msecs - margin, ub = msecs + margin;
int in_bounds = (passed >= lb) && (passed <= ub);
ok(in_bounds, "evsched: receive time %.1lfms is in <%.1lf,%.1lf>",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment