Allow stopwatch and printcounter to go over 18 hours

This commit is contained in:
Scott Lahteine
2016-07-12 19:03:42 -07:00
parent 6080924589
commit e481b79af1
7 changed files with 24 additions and 26 deletions

View File

@ -88,9 +88,9 @@ bool Stopwatch::isPaused() {
return (this->state == STOPWATCH_PAUSED) ? true : false;
}
uint16_t Stopwatch::duration() {
millis_t Stopwatch::duration() {
return (((this->isRunning()) ? millis() : this->stopTimestamp)
- this->startTimestamp) / 1000 + this->accumulator;
- this->startTimestamp) / 1000UL + this->accumulator;
}
#if ENABLED(DEBUG_STOPWATCH)