diff options
Diffstat (limited to 'cpukit/score/src/timespectoticks.c')
-rw-r--r-- | cpukit/score/src/timespectoticks.c | 7 |
1 files changed, 4 insertions, 3 deletions
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; |