$mw->repeat(10, sub{ #code to be executed });