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.
In reply to Re^3: do something no more than 3 times a second
by rovf
in thread do something no more than 3 times a second
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |