`endtime` must be computed on every iteration, without `_setup` being called again.  In this case, `endtime` should be a local variable within `_execute`, and `duration` should be stored on the class.