diff options
Diffstat (limited to 'examples/APG/Timers/Timers.cpp')
-rw-r--r-- | examples/APG/Timers/Timers.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/APG/Timers/Timers.cpp b/examples/APG/Timers/Timers.cpp index 4a95e0d4315..761f03a650c 100644 --- a/examples/APG/Timers/Timers.cpp +++ b/examples/APG/Timers/Timers.cpp @@ -33,14 +33,15 @@ int ACE_TMAIN (int, ACE_TCHAR *[]) CB cb[10]; long args[10]; - for (int i = 0; i < 10 ; i++) + for (long i = 0; i < 10 ; i++) { + ACE_Time_Value const timeout (i); long timerID = Timer::instance ()->schedule (&cb[i], &args[i], timer_queue->gettimeofday () + (ACE_Time_Value)5, - i); + timeout); // Set the timerID state variable of the handler. cb[i].setID (timerID); |