in reply to Re^2: do something no more than 3 times a second
in thread do something no more than 3 times a second
This can be done without a busy loop.Of course, it can, if you use a HiRes timer. I've suggested the busy loop as an alternative (since the timer was already suggested by JavaFan anyway), in case the OP doesn't want to use the timer. Though doing a busy loop is quite often a bad idea, there *are* cases where it makes more sense than using this kind of timer. I thought that if the OP sees these alternatives, s/he can choose what works best in the current situation.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: do something no more than 3 times a second
by ikegami (Patriarch) on Nov 29, 2010 at 08:00 UTC | |
by rovf (Priest) on Nov 29, 2010 at 10:00 UTC | |
by ikegami (Patriarch) on Nov 29, 2010 at 16:54 UTC | |
by rovf (Priest) on Dec 01, 2010 at 08:40 UTC |