Both window.setTimeout, window.setInterval, window.clearTimeout, and window.clearInterval replicate the behavior that is in the Timer and Timer.repeating class. So, we merged the functionality just into Timer. Expect setImmediate to change in the future as well once Future has some additional functionality.
What this means for you, in terms of examples -- in the old version, you would write:
window.setTimeout(() { doStuff(); }, 0);
in the new version you just write:
import 'dart:async';
Timer.run(doStuffCallback);
-----
Some other examples for the change:
Old way:
var id = window.setTimeout(doStuffCallback, 10);
.... some time later....
window.clearTimeout(id);
id = window.setInterval(doStuffCallback, 1000);
window.clearInterval(id);
New way:
var timer = new Timer(const Duration(milliseconds: 10), doStuffCallback);
... some time later ---
timer.cancel();
timer = new Timer.repeating(const Duration(seconds: 1), doStuffCallback);
timer.cancel();