summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/ptimer1.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix/src/ptimer1.c')
-rw-r--r--cpukit/posix/src/ptimer1.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/cpukit/posix/src/ptimer1.c b/cpukit/posix/src/ptimer1.c
index 907645ce18..ddb7d5c66a 100644
--- a/cpukit/posix/src/ptimer1.c
+++ b/cpukit/posix/src/ptimer1.c
@@ -175,8 +175,8 @@ void ITIMERSPEC_TO_RTEMS_TIME_OF_DAY_S
rtems_time->second = seconds;
- rtems_time->ticks = ( itimer->it_value.tv_nsec * SEC_TO_TICKS_C ) /
- NSEC_PER_SEC_C;
+ rtems_time->ticks = itimer->it_value.tv_nsec/
+ (NSEC_PER_SEC_C / SEC_TO_TICKS_C);
}
@@ -573,8 +573,7 @@ int timer_settime(
timer_struct[timer_pos].ticks =
( SEC_TO_TICKS_C * value->it_value.tv_sec ) +
- ( value->it_value.tv_nsec /
- (1000L * (unsigned32)(1000 * 10) ));
+ ( value->it_value.tv_nsec / (NSEC_PER_SEC_C / SEC_TO_TICKS_C));
return_v = rtems_timer_fire_after ( timerid,
timer_struct[timer_pos].ticks,