Mercurial > flash_v2
diff packages/kernel/current/src/common/clock.cxx @ 115:6ed91473a1cd ecos-sw-2000-08-21
Merge from eCos master repository on 2000-08-21-22:40:54-BST
| author | jlarmour |
|---|---|
| date | Fri, 25 Aug 2000 17:32:38 +0000 |
| parents | 59d97b6ba612 |
| children | 0ae0bc38e387 |
line wrap: on
line diff
--- a/packages/kernel/current/src/common/clock.cxx +++ b/packages/kernel/current/src/common/clock.cxx @@ -785,6 +785,24 @@ void Cyg_Alarm::enable() } } +// ------------------------------------------------------------------------- +// Get the current time values from the alarm + +void Cyg_Alarm::get_times( + cyg_tick_count *t, // Next trigger time + cyg_tick_count *i // Current interval + ) +{ + // Lock the scheduler while we do this to avoid + // race conditions. + Cyg_Scheduler::lock(); + + if( t != NULL ) *t = trigger; + if( i != NULL ) *i = interval; + + Cyg_Scheduler::unlock(); +} + //========================================================================== // System clock object
