Revision 986
moved stuff from robot_test into libsim.c
libsim now contains the timer (pause/resume) stuff
Also commented andrew's code because it broke the build
test_timer.c | ||
---|---|---|
2 | 2 |
#include <sys/time.h> |
3 | 3 |
#include <signal.h> |
4 | 4 |
|
5 |
volatile int i; |
|
6 |
|
|
5 | 7 |
void *tick(int sig) |
6 | 8 |
{ |
7 |
printf("tick\n");
|
|
9 |
printf("tick. i=%d\n", i);
|
|
8 | 10 |
fflush(stdout); |
9 | 11 |
|
10 | 12 |
return NULL; |
... | ... | |
27 | 29 |
printf("setitimer returned %d.\n waiting...\n", ret); |
28 | 30 |
fflush(stdout); |
29 | 31 |
|
30 |
while(1);
|
|
32 |
i=0;
|
|
31 | 33 |
|
34 |
while(1) |
|
35 |
i++; |
|
36 |
|
|
32 | 37 |
return 0; |
33 | 38 |
} |
Also available in: Unified diff