diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-12-16 17:36:01 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-12-16 17:36:01 +0000 |
commit | 3d66dfc1cb98974df47bf4735291a674d34038bc (patch) | |
tree | 23d592a42aa1a333463855389a9a6a0151a3f704 /cpukit/score/src | |
parent | 2008-12-16 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-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/score/src')
-rw-r--r-- | cpukit/score/src/timespecfromticks.c | 3 | ||||
-rw-r--r-- | cpukit/score/src/timespectoticks.c | 7 | ||||
-rw-r--r-- | cpukit/score/src/ts64toticks.c | 3 |
3 files changed, 8 insertions, 5 deletions
diff --git a/cpukit/score/src/timespecfromticks.c b/cpukit/score/src/timespecfromticks.c index 73dda79db9..a3f44977fc 100644 --- a/cpukit/score/src/timespecfromticks.c +++ b/cpukit/score/src/timespecfromticks.c @@ -16,6 +16,7 @@ #include <time.h> #include <rtems/system.h> +#include <rtems/config.h> #include <rtems/score/timespec.h> #include <rtems/score/tod.h> @@ -26,7 +27,7 @@ void _Timespec_From_ticks( { uint32_t usecs; - usecs = ticks * _TOD_Microseconds_per_tick; + usecs = ticks * rtems_configuration_get_microseconds_per_tick(); time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * diff --git a/cpukit/score/src/timespectoticks.c b/cpukit/score/src/timespectoticks.c index 550ce617b3..51ad0e07f3 100644 --- a/cpukit/score/src/timespectoticks.c +++ b/cpukit/score/src/timespectoticks.c @@ -17,9 +17,11 @@ #include "config.h" #endif +#include <sys/types.h> + #include <rtems/system.h> +#include <rtems/config.h> #include <rtems/score/timespec.h> -#include <sys/types.h> #include <rtems/score/tod.h> #include <rtems/score/watchdog.h> @@ -39,8 +41,7 @@ uint32_t _Timespec_To_ticks( ticks = time->tv_sec * TOD_TICKS_PER_SECOND; - ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / - _TOD_Microseconds_per_tick; + ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) return ticks; diff --git a/cpukit/score/src/ts64toticks.c b/cpukit/score/src/ts64toticks.c index 5594387df8..d751a109a1 100644 --- a/cpukit/score/src/ts64toticks.c +++ b/cpukit/score/src/ts64toticks.c @@ -20,6 +20,7 @@ #include <sys/types.h> #include <rtems/system.h> +#include <rtems/config.h> #include <rtems/score/timestamp.h> #include <rtems/score/tod.h> @@ -31,7 +32,7 @@ uint32_t _Timestamp64_To_ticks( { uint32_t ticks; - ticks = *time / (_TOD_Microseconds_per_tick * 1000); + ticks = *time / rtems_configuration_get_nanoseconds_per_tick(); if ( ticks ) return ticks; return 1; |