reeder@reed.bitnet (Doug Reeder,,,2343817) (12/16/90)
My suggestion for timing, independent of processor speed, that works on different machines, is to have an interrupt routine increment a counter and have the main program watch the counter. You would need different interrupt routines on different machines. IIc's have VBL available. IIgs's have some sort of regular interrupts available. IIe's with super serial cards can get regular interrupts. A number of clock cards can do this. The counter would count 'ticks', with ticks being a fraction of a second chosen to be a sub-fraction of common intervals. I use 1/1920 of a second because even multiples of it make up all baud rate intervals (except one) available on the SSC (assuming 8N1, and thus 10bits/byte). 32 ticks make 1/60th of a second. This would require complicated setup in the program (but no user input), but code thereafter is system independant. (Just check the counter.) The idea of a system-dependant source of interrupts has application to background tasks and multitasking. IMHO, a few programs which run in the background would satisfy most people's need for multitasking. Print spooling, background file downloading, and background file unarchiving and a few others are all most people would need.