summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/clockset.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/rtems/src/clockset.c')
-rw-r--r--cpukit/rtems/src/clockset.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpukit/rtems/src/clockset.c b/cpukit/rtems/src/clockset.c
index 1b1bbe8b04..30127cdc39 100644
--- a/cpukit/rtems/src/clockset.c
+++ b/cpukit/rtems/src/clockset.c
@@ -16,6 +16,7 @@
#endif
#include <rtems/system.h>
+#include <rtems/config.h>
#include <rtems/rtems/status.h>
#include <rtems/rtems/clock.h>
#include <rtems/score/isr.h>
@@ -49,7 +50,7 @@ rtems_status_code rtems_clock_set(
if ( _TOD_Validate( time_buffer ) ) {
newtime.tv_sec = _TOD_To_seconds( time_buffer );
newtime.tv_nsec = time_buffer->ticks *
- (_TOD_Microseconds_per_tick * TOD_NANOSECONDS_PER_MICROSECOND);
+ rtems_configuration_get_nanoseconds_per_tick();
_Thread_Disable_dispatch();
_TOD_Set( &newtime );