Use the same end-of-microtask-esque loop for setImmediate().