timer static method

Timer timer(
  1. void then(), [
  2. int ms = 50
])
Timer timer = Mixins.timer((){
  // do something...
}, 100);

Implementation

static Timer timer(void Function() then, [int ms = 50]) =>
    Timer(Duration(milliseconds: ms), then);