April 9th, 2003, 12:45 PM
problems with the sleep function...
when i use the sleep function, it looks like it works, but rather strangly...
so if i do:
it will freeze and when it unfreezes, it will display:
instantly, without the 1 secound pause that was supposed to be between them.
thanks to every1 that will be kind enough to help...
April 9th, 2003, 03:08 PM
Your code worked fine for me on Red Hat 7.0.
I assume that you are just running it straight from the command line and not redirecting or piping the output. For example, when I piped the output to more, I got the same behavior that you described. That would tell me that for some reason your output is getting buffered somewhere and isn't getting written to stdout until the program exits. Tell me, when you say that the system freezes, does it freeze for just about two seconds?
Last edited by dwise1_aol; April 9th, 2003 at 03:11 PM.