Changeset 6d19b7e in rtems


Ignore:
Timestamp:
Jul 7, 2000, 7:31:28 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
822d6b4
Parents:
7f51092
Message:

Fixed problem reported by Victor V. Vengerov <Victor.Vengerov@…>
where alarm() did not correctly account for the watchdog start_time
and stop_time fields being based on ticks not seconds. This resulted
in alarm() returning a bogus number of seconds remaining.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/posix/src/alarm.c

    r7f51092 r6d19b7e  
    3636    case WATCHDOG_ACTIVE:
    3737    case WATCHDOG_REMOVE_IT:
     38      /*
     39       *  The stop_time and start_time fields are snapshots of ticks since
     40       *  boot.  Since alarm() is dealing in seconds, we must account for
     41       *  this.
     42       */
     43
    3844      remaining = the_timer->initial -
    39                   (the_timer->stop_time - the_timer->start_time);
     45       ((the_timer->stop_time - the_timer->start_time) / _TOD_Ticks_per_second);
    4046      break;
    4147  }
Note: See TracChangeset for help on using the changeset viewer.