From 16ce86f9c8b4e976af9326ce71b4769e19ecf6d1 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 15 Aug 2000 13:00:01 +0000 Subject: 2000-08-15 Joel Sherrill * posix/src/ptimer1.c (timer_settime): Converted use of rtems_clock_get to use SuperCore _TOD_Current variable. --- c/src/exec/posix/src/ptimer1.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'c/src/exec/posix/src') diff --git a/c/src/exec/posix/src/ptimer1.c b/c/src/exec/posix/src/ptimer1.c index b29654e6d5..5f28d3cc92 100644 --- a/c/src/exec/posix/src/ptimer1.c +++ b/c/src/exec/posix/src/ptimer1.c @@ -260,8 +260,7 @@ rtems_timer_service_routine FIRE_TIMER_S (rtems_id timer, void *data) /* Stores the time when the timer was started again */ - return_v = rtems_clock_get ( RTEMS_CLOCK_GET_TOD, - &timer_struct[timer_pos].time ); + timer_struct[timer_pos].time = _TOD_Current; /* The state has not to be actualized, because nothing modifies it */ @@ -394,12 +393,11 @@ int timer_create( return 0; - case RTEMS_INVALID_NAME : /* The assigned name is not valid*/ + case RTEMS_INVALID_NAME : /* The assigned name is not valid */ PRINT_MSG_S ("ERROR: rtems create timer RTEMS_INVALID_NAME"); errno = EINVAL; - return (-1); @@ -610,9 +608,7 @@ int timer_settime( /* Stores the time in which the timer was started again */ - return_v = rtems_clock_get ( RTEMS_CLOCK_GET_TOD, - &timer_struct[timer_pos].time ); - + timer_struct[timer_pos].time = _TOD_Current; return 0; break; @@ -686,8 +682,7 @@ int timer_settime( /* Stores the time in which the timer was started again */ - return_v = rtems_clock_get ( RTEMS_CLOCK_GET_TOD, - &timer_struct[timer_pos].time ); + timer_struct[timer_pos].time = _TOD_Current; return 0; @@ -780,7 +775,7 @@ int timer_gettime( /* Reads the current time */ - return_v = rtems_clock_get ( RTEMS_CLOCK_GET_TOD, ¤t_time ); + current_time = _TOD_Current; timer_pos = TIMER_POSITION_F ( timerid ); -- cgit v1.2.3