in reply to ctrl + c on Win32 (signal handling)
#this is what I can do best so far... #sleep 3 for (0 .. 10);
Given the limited function of the sample code, that is the best solution. Though I'd go for:
1 while sleep 1;
Waking up once a second will improve your response time and cause negligible extra cpu usage.
But I suspect that in your real code you are wanting to do more in the while than just sleep?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: ctrl + c on Win32 (signal handling)
by remiah (Hermit) on Aug 26, 2011 at 14:35 UTC | |
by remiah (Hermit) on Aug 26, 2011 at 21:06 UTC |