2001-09-28 Joel Sherrill <joel@OARcorp.com>

* src/clockgetres.c: Fixed math problem.  We are not converting
	an interval to a timespec -- it is actually a real number of
	microseconds.
This commit is contained in:
Joel Sherrill
2001-10-10 18:37:02 +00:00
parent 7ec48c0511
commit 710b4e09b4

View File

@@ -36,8 +36,11 @@ int clock_getres(
case CLOCK_REALTIME: case CLOCK_REALTIME:
case CLOCK_PROCESS_CPUTIME: case CLOCK_PROCESS_CPUTIME:
case CLOCK_THREAD_CPUTIME: case CLOCK_THREAD_CPUTIME:
if ( res ) if ( res ) {
_POSIX_Interval_to_timespec( _TOD_Microseconds_per_tick, res ); res->tv_sec = _TOD_Microseconds_per_tick / 1000000;
res->tv_nsec = _TOD_Microseconds_per_tick * 1000;
/* _POSIX_Interval_to_timespec( _TOD_Microseconds_per_tick, res ); */
}
break; break;
default: default: