1. A method for inducing thread switches during execution of a program at intervals other than thread intervals normally scheduled by an operating system, the method comprising: selecting an interval after which to trigger an interrupt on a processor executing the program; causing an interrupt at the end of the interval; and upon interrupt, causing the processor to prematurely switch from executing a current thread being executed to executing another thread ready to be executed.