diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-08-18 00:26:13 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-08-18 00:26:13 +0000 |
commit | fcea0b5bc3e89dea3e465476933e99a9a7227f36 (patch) | |
tree | dcfa539c682c064d030e6e5c8cb5d2cb1f2f9b2e /ace/Timer_Hash_T.cpp | |
parent | d1a9c1f4b2b9e2fb6d17d34fec83bb74aa499f52 (diff) | |
download | ATCD-fcea0b5bc3e89dea3e465476933e99a9a7227f36.tar.gz |
ChangeLogTag:Tue Aug 17 19:10:00 1999 Darrell Brunsch <brunsch@cs.wustl.edu>
Diffstat (limited to 'ace/Timer_Hash_T.cpp')
-rw-r--r-- | ace/Timer_Hash_T.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ace/Timer_Hash_T.cpp b/ace/Timer_Hash_T.cpp index 8b64b423d37..3f6292924dd 100644 --- a/ace/Timer_Hash_T.cpp +++ b/ace/Timer_Hash_T.cpp @@ -365,6 +365,27 @@ ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::schedule (const TYPE &type, h); } +// Locate and update the inteval on the timer_id + +template <class TYPE, class FUNCTOR, class ACE_LOCK, class BUCKET> int +ACE_Timer_Hash_T<TYPE, FUNCTOR, ACE_LOCK, BUCKET>::reset_interval (const long timer_id, + const ACE_Time_Value &interval) +{ + ACE_TRACE ("ACE_Timer_Hash_T::reset_interval"); + ACE_MT (ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, -1)); + + // Make sure we are getting a valid <timer_id>, not an error + // returned by <schedule>. + if (timer_id == -1) + return 0; + + Hash_Token *h = ACE_reinterpret_cast (Hash_Token *, + timer_id); + + return this->table_[h->pos_]->reset_interval (h->orig_id_, + interval); +} + // Locate and remove the single <ACE_Event_Handler> with a value of // <timer_id> from the correct table timer queue. |