annotate TOOLS/usleep-test.c @ 12762:cf8979836dc5

100l, OSX compile fix, patch by Steven Schulz (sms (at) 2BSD (dot) com)
author reimar
date Tue, 06 Jul 2004 11:10:27 +0000
parents 1187542d84d8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4400
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
1
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
2 main(){
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
3 int u;
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
4
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
5 for(u=0;u<30000;u+=500){
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
6 unsigned int x[9];
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
7 int i;
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
8 x[0]=GetTimer();
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
9 for(i=1;i<=8;i++){
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
10 usleep(u);
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
11 x[i]=GetTimer();
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
12 }
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
13 printf("%d -> %d %d %d %d %d %d %d %d\n",u,
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
14 x[1]-x[0],
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
15 x[2]-x[1],
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
16 x[3]-x[2],
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
17 x[4]-x[3],
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
18 x[5]-x[4],
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
19 x[6]-x[5],
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
20 x[7]-x[6],
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
21 x[8]-x[7]
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
22 );
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
23 }
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
24
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
25
1187542d84d8 usleep() accurancy tester
arpi
parents:
diff changeset
26 }