Thanks. I wanted to try something like that, but the problem is the processor may have to do other things while the time is ticking away. Let me show it this way:
time 0.0 seconds -> We have an input, so we start counting.
time 0.1 seconds -> Is test1, test2, or test3 equal to 1? No? Let's keep counting.
. . .
time 12.3 seconds -> Is test1, test2, or test3 equal to 123? YES, test2 is! Let's quickly perform operation A while counting continues in the background. Is there any test value greater than 123? YES, test3 is, so let's just keep counting
. . .
time 45.6 seconds -> Is test1, test2, or test3 equal to 456? YES, test3 is! Let's quickly perform operation B while counting continues in the background. Is there any test value greater than 456? NO!--let's reset the counter to 0 and wait for another input.
Bookmarks