It could be quite useful to have a macro that can insert random delays in a program, when testing is enabled. It should take both minimum and maximum delay times (in seconds) and a probability threshold for a delay to occur at all. For example:
?randomDelay(0.25, 1.0, 5.0)
would mean that when this code runs, if testing is enabled, there is a 25% chance that the process will be suspended, for a random time between 1.0 and 5.0 seconds.