summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/scheduler/test_scheduler.cc
diff options
context:
space:
mode:
Diffstat (limited to '2005/i/robert/src/scheduler/test_scheduler.cc')
-rw-r--r--2005/i/robert/src/scheduler/test_scheduler.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/2005/i/robert/src/scheduler/test_scheduler.cc b/2005/i/robert/src/scheduler/test_scheduler.cc
index e16ecb1..8f87e4f 100644
--- a/2005/i/robert/src/scheduler/test_scheduler.cc
+++ b/2005/i/robert/src/scheduler/test_scheduler.cc
@@ -25,10 +25,10 @@
#include "schedulable_read_fd.hh"
#include "schedulable_alarm.hh"
#include "utils/bind.hh"
+#include "timer/timer.hh"
#include <iostream>
#include <unistd.h>
-#include <time.h>
void
ev (void)
@@ -41,8 +41,8 @@ ev (void)
void
to (const char *msg)
{
- std::cout << "timeout received " << msg << " at " << time (0) * 1000 <<
- std::endl;
+ std::cout << "timeout received \"" << msg << "\" at "
+ << Timer::getProgramTime () << std::endl;
}
int
@@ -54,8 +54,8 @@ main (void)
Scheduler s;
SchedulableReadFd srf (ev, 0);
s.insert (srf);
- std::cout << "start at " << time (0) * 1000 << std::endl;
- SchedulableAlarm sa1 (utils::bind<void> (to, "3s"), time (0) * 1000, 1000);
+ std::cout << "start at " << Timer::getProgramTime () << std::endl;
+ SchedulableAlarm sa1 (utils::bind<void> (to, "1s"), 1000);
s.insert (sa1);
s.schedule (10000);
}