- unsigned long long int th_diff = tsdiff (&before, &after);
- unsigned long long int pdiff = tsdiff (&process_before, &process_after);
- unsigned long long int my_diff = tsdiff (&me_before, &me_after);
-
- if (th_diff < 100000000 || th_diff > 600000000)
- {
- printf ("live thread before - after %llu outside reasonable range\n",
- th_diff);
- result = 1;
- }
-
- if (my_diff > 100000000)
- {
- printf ("self thread before - after %llu outside reasonable range\n",
- my_diff);
- result = 1;
- }
-
- if (pdiff < th_diff)
- {
- printf ("process before - after %llu outside reasonable range (%llu)\n",
- pdiff, th_diff);
- result = 1;
- }
-
- process_after.tv_nsec += test_nanosleep (th_clock, "live thread",
- &after, &result);
- process_after.tv_nsec += test_nanosleep (process_clock, "process",
- &process_after, &result);
+ test_nanosleep (th_clock, "live thread",
+ &result);
+ test_nanosleep (process_clock, "process",
+ &result);