blob: e93df0654f9d55d1c6511304a99e2e9cabdc90fd [file] [log] [blame]
Emeric Vigier2f625822012-08-06 11:09:52 -04001
2#include <cc++/thread.h>
3#include <cstdio>
4
5#ifdef CCXX_NAMESPACES
6using namespace std;
7using namespace ost;
8#endif
9
10
11int main(int argc, char* argv[])
12{
13 TimerPort timer;
14 unsigned i = 12;
15 time_t now, start;
16
17 time(&start);
18 timer.setTimer();
19 fflush(stdout);
20 while(i--) {
21 timer.incTimer(250);
22 Thread::sleep(250);
23 printf("!");
24 fflush(stdout);
25 }
26 time(&now);
27 printf("%ld", now - start);
28 for(;;) {
29 timer.incTimer(100);
30 timer.sleepTimer();
31 printf(".");
32 fflush(stdout);
33 }
34 return 0;
35}
36