Optimise setTime if time is between known states