diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-10-10 18:37:02 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-10-10 18:37:02 +0000 |
commit | 710b4e09b4b29c1dc14d0fca4fd9feccb2a7f50d (patch) | |
tree | e524928e3a80eed7b21375f50511b2f9e1f42c8c | |
parent | 2001-10-08 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-710b4e09b4b29c1dc14d0fca4fd9feccb2a7f50d.tar.bz2 |
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.
-rw-r--r-- | c/src/exec/posix/src/clockgetres.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/c/src/exec/posix/src/clockgetres.c b/c/src/exec/posix/src/clockgetres.c index 3be3439cdb..73084e1de8 100644 --- a/c/src/exec/posix/src/clockgetres.c +++ b/c/src/exec/posix/src/clockgetres.c @@ -36,8 +36,11 @@ int clock_getres( case CLOCK_REALTIME: case CLOCK_PROCESS_CPUTIME: case CLOCK_THREAD_CPUTIME: - if ( res ) - _POSIX_Interval_to_timespec( _TOD_Microseconds_per_tick, res ); + if ( 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; default: |