Fixed bug identified by Kevin. If pollrate is larger than elapsedtime, we'd wrap...