summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/clockgetres.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-12-16 17:36:01 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-12-16 17:36:01 +0000
commit3d66dfc1cb98974df47bf4735291a674d34038bc (patch)
tree23d592a42aa1a333463855389a9a6a0151a3f704 /cpukit/posix/src/clockgetres.c
parent2008-12-16 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-3d66dfc1cb98974df47bf4735291a674d34038bc.tar.bz2
2008-12-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/__times.c, posix/src/adjtime.c, posix/src/clockgetres.c, posix/src/sysconf.c, rtems/src/clockgettickspersecond.c, rtems/src/clockgettod.c, rtems/src/clockset.c, rtems/src/clocktodvalidate.c, score/src/timespecfromticks.c, score/src/timespectoticks.c, score/src/ts64toticks.c: More case converted to use configuration table entry not _TOD_Microseconds_per_tick.
Diffstat (limited to 'cpukit/posix/src/clockgetres.c')
-rw-r--r--cpukit/posix/src/clockgetres.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/cpukit/posix/src/clockgetres.c b/cpukit/posix/src/clockgetres.c
index 9c5f1be925..2698734547 100644
--- a/cpukit/posix/src/clockgetres.c
+++ b/cpukit/posix/src/clockgetres.c
@@ -21,6 +21,7 @@
#include <errno.h>
#include <rtems/system.h>
+#include <rtems/config.h>
#include <rtems/score/isr.h>
#include <rtems/score/thread.h>
#include <rtems/score/tod.h>
@@ -51,9 +52,9 @@ int clock_getres(
case CLOCK_PROCESS_CPUTIME:
case CLOCK_THREAD_CPUTIME:
if ( res ) {
- res->tv_sec = _TOD_Microseconds_per_tick / 1000000;
- res->tv_nsec = _TOD_Microseconds_per_tick * 1000;
- /* _TOD_From_ticks( _TOD_Microseconds_per_tick, res ); */
+ res->tv_sec = rtems_configuration_get_microseconds_per_tick() /
+ TOD_MICROSECONDS_PER_SECOND;
+ res->tv_nsec = rtems_configuration_get_nanoseconds_per_tick();
}
break;