Hi professor, I've been running the nanosleep program on some more machines, since the timing was 'off' on the CS machines. Turns out that stargate takes 10 seconds to comple te this program, while CS lab machines (the hrn*****machines) take 20 seconds to complete. Your homemachine took the (expected) 5 seconds to complete. After a small google search considering this nanosleep command, it turns out tha t the time-to-sleep is a *minimum* sleep time. The kernel can decide to let you sleep longer, depending on (at least) the internal clock. Quote: > It doesn't work that way. Each call to nanosleep() gives you a > *MINIMUM* time to delay. The kernel may decide to schedule you away and > pick your process up when it suits it. source: http://lkml.indiana.edu/hypermail/linux/kernel/0204.1/0388.html Just thought this was interesting and wanted to let you know :-). Some output (no research is complete without tests of course): [jroel@stargate labs]# time ./nanowait > nanowait.txt real 0m10.114s user 0m0.001s sys 0m0.004s RTT: 1948 microseconds RTT: 1949 microseconds RTT: 2197 microseconds RTT: 1949 microseconds RTT: 1947 microseconds RTT is found this way: gettimeofday( &tvsend, NULL); nanosleep( &myts, NULL ); gettimeofday( &tvrecv, NULL ); ________________________________ [jroel@hrn53009 labs]# time ./nanowait > nanowait.txt2 real 0m20.062s user 0m0.000s sys 0m0.000s RTT: 3110 microseconds RTT: 3967 microseconds RTT: 4019 microseconds RTT: 4021 microseconds RTT: 4020 microseconds RTT: 4020 microseconds ________________________________ As you can see from these results (especially on hrn53009) these sleep times can differ enormously (from 3110 to 4020 microseconds). And we are asking for a 100 0 microseconds sleep... Regards, Jasper --------------------------------------------------------------- Thanks, Jasper, for letting us know what you found out about the 'nanosleep()' function provided in Linux. Obviously, we will have to exercise more caution if we use this routine. --ALLAN CRUSE ---------------------------------------------------------------