Helper function for constructing for key,value loops as an expression.
Calls state.checkTime() on every iteration.
None
nothing