Rework the print job timer to use the stopwatch class

This commit is contained in:
João Brázio
2016-04-06 04:34:03 +01:00
parent 399101fff3
commit eb61051556
5 changed files with 47 additions and 77 deletions

View File

@@ -739,9 +739,9 @@ static void lcd_implementation_status_screen() {
lcd.setCursor(LCD_WIDTH - 6, 2);
lcd.print(LCD_STR_CLOCK[0]);
if (print_job_start_ms != 0) {
uint16_t time = (((print_job_stop_ms > print_job_start_ms)
? print_job_stop_ms : millis()) - print_job_start_ms) / 60000;
uint16_t time = print_job_timer.duration() / 60;
if (time != 0) {
lcd.print(itostr2(time / 60));
lcd.print(':');
lcd.print(itostr2(time % 60));