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

@@ -334,9 +334,8 @@ static void lcd_implementation_status_screen() {
}
u8g.setPrintPos(80,48);
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));