diff options
author | harrison <harrison@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-02-26 01:51:45 +0000 |
---|---|---|
committer | harrison <harrison@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-02-26 01:51:45 +0000 |
commit | e250aca027bddd4ef3a5f1bfba7d6070c5d193e5 (patch) | |
tree | 7fcc1803062ca5c223c3b5003c677b1d9219c6e6 /ace/Timer_Queue.cpp | |
parent | 32148192252ebe808406cdce97b89dc33f783aab (diff) | |
download | ATCD-e250aca027bddd4ef3a5f1bfba7d6070c5d193e5.tar.gz |
Reactors now call Timer_Queue::gettimeofday. Timer_Queue takes a
gettimeofday strategy (pointer to function).
Diffstat (limited to 'ace/Timer_Queue.cpp')
-rw-r--r-- | ace/Timer_Queue.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/ace/Timer_Queue.cpp b/ace/Timer_Queue.cpp index 738ea7a4263..8b174434ac8 100644 --- a/ace/Timer_Queue.cpp +++ b/ace/Timer_Queue.cpp @@ -109,8 +109,8 @@ ACE_Timer_Queue::dump (void) const } ACE_Timer_Queue::ACE_Timer_Queue (void) - : timer_skew_ (0, ACE_TIMER_SKEW) - + : timer_skew_ (0, ACE_TIMER_SKEW), + gettimeofday_ (ACE_OS::gettimeofday) { ACE_TRACE ("ACE_Timer_Queue::ACE_Timer_Queue"); } @@ -177,5 +177,13 @@ ACE_Timer_Queue::expire (const ACE_Time_Value &cur_time) ACE_Time_Value ACE_Timer_Queue::gettimeofday (void) { - return ACE_OS::gettimeofday (); + // Invoke gettimeofday via pointer to function. + return gettimeofday_ (); +} + +void +ACE_Timer_Queue::gettimeofday (ACE_Time_Value (*gettimeofday)(void)) +{ + gettimeofday_ = gettimeofday; } + |