I tryed it on my desktop
SunOS ogg 5.7 Generic_106541-14 sun4u sparc SUNW,Ultra-Enterprise
334.84 Mhz
I had to remove nanosleep(&delay, NULL);
I think that is a linux only func.
under solaris there is the gethrtime, gethrvtime - get high resolution time
The gethrtime() function returns the current high-resolution
real time. Time is expressed as nanoseconds since some arbi-
trary time in the past; it is not correlated in any way to
the time of day, and thus is not subject to resetting or
drifting by way of adjtime(2) or settimeofday(3C). The hi-
res timer is ideally suited to performance measurement
tasks, where cheap, accurate interval timing is required.
I guess this might be the best thing for solaris ??
This is what I got rember nanosleep_sleep is gone just a null func
a.out
Testing _select_sleep (x 1000), delay 3
Total time: 10438.354000 ms; unit time: 10.438354 ms; estimated overhead:
7.438354 ms
Testing _usleep_sleep (x 1000), delay 3
Total time: 20019.857000 ms; unit time: 20.019857 ms; estimated overhead:
17.019857 ms
Testing _nanosleep_sleep (x 1000), delay 3
Total time: 0.631000 ms; unit time: 0.000631 ms; estimated overhead: -2.999369
ms
Testing _select_sleep (x 1000), delay 8
Total time: 9998.951000 ms; unit time: 9.998951 ms; estimated overhead:
1.998951 ms
Testing _usleep_sleep (x 1000), delay 8
Total time: 19999.462000 ms; unit time: 19.999462 ms; estimated overhead:
11.999462 ms
Testing _nanosleep_sleep (x 1000), delay 8
Total time: 0.637000 ms; unit time: 0.000637 ms; estimated overhead: -7.999363
ms
Testing _select_sleep (x 1000), delay 13
Total time: 20009.379000 ms; unit time: 20.009379 ms; estimated overhead:
7.009379 ms
Testing _usleep_sleep (x 1000), delay 13
Total time: 20019.940000 ms; unit time: 20.019940 ms; estimated overhead:
7.019940 ms
Testing _nanosleep_sleep (x 1000), delay 13
Total time: 0.626000 ms; unit time: 0.000626 ms; estimated overhead:
-12.999374 ms
Testing _select_sleep (x 1000), delay 18
Total time: 19999.099000 ms; unit time: 19.999099 ms; estimated overhead:
1.999099 ms
Testing _usleep_sleep (x 1000), delay 18
Total time: 20340.081000 ms; unit time: 20.340081 ms; estimated overhead:
2.340081 ms
Testing _nanosleep_sleep (x 1000), delay 18
Total time: 0.634000 ms; unit time: 0.000634 ms; estimated overhead:
-17.999366 ms
Testing _select_sleep (x 1000), delay 23
Total time: 30048.943000 ms; unit time: 30.048943 ms; estimated overhead:
7.048943 ms
Testing _usleep_sleep (x 1000), delay 23
Total time: 30000.025000 ms; unit time: 30.000025 ms; estimated overhead:
7.000025 ms
Testing _nanosleep_sleep (x 1000), delay 23
Total time: 0.643000 ms; unit time: 0.000643 ms; estimated overhead:
-22.999357 ms
Testing _select_sleep (x 1000), delay 28
Total time: 30028.666000 ms; unit time: 30.028666 ms; estimated overhead:
2.028666 ms
Testing _usleep_sleep (x 1000), delay 28
Total time: 30010.342000 ms; unit time: 30.010342 ms; estimated overhead:
2.010342 ms
Testing _nanosleep_sleep (x 1000), delay 28
Total time: 0.626000 ms; unit time: 0.000626 ms; estimated overhead:
-27.999374 ms
_______________________________________________
Xmame mailing list
[EMAIL PROTECTED]
http://toybox.twisted.org.uk/mailman/listinfo/xmame