Before I start, my condolences to Phil Maquet's family. My sincere sympathies to his family. May his sould rest in peace.
I do not know whether this should appear in the intermediate or beginner section. My question is - What is the importance of the sleep method? or Under what circumstances I should use the sleep method ?
The only answer I can think of is time slicing. Please let me have your comments.
Most of the time, I use "sleep()" during debugging, to slow something down so I can look at it on the screen! But otherwise, I think it's most often used in graphics and animation; for example, you might paint the screen, sleep for 50 milliseconds, and paint again.
Thanks Ernest. But is it ok to think that "Sleep method may be used for time slicing".
I do not write much client side program dealing with GUI. I am more on the server side. But still if I am asked such a question "What is the importance of sleep method, or when will you use it" what should I say ?.
Frank and honest answer would be - "I never came across a situation to use it".
author and iconoclast