3 ms·
Isn't the line: while(time(NULL) > markTime) { /* do nothing */ } some sort of sleep mechanism? What's the point again?
by fmora 16y ago
Isn't the line:
while(time(NULL) > markTime) { /* do nothing */ }
some sort of sleep mechanism?
What's the point again?
- kevinskii 16y agoThe "no sleep statement" rule is just there to prevent a pseudocode solution from being too easy. The point is to see if someone will submit something that makes me think, "Oh wow, I would have never considered doing it that way." Thus expanding my software horizons forevermore. It's a simple problem with potentially several creative solutions.
- mooism2 16y agoBusy waiting isn't any more interesting than calling sleep(). Spectacularly convoluted ways of generating a particular output, yes, that could be interesting.