optimisation: used expired() instead of elapsed()

If the timer is expired, then the timer is stopped. This is OK since
we are starting the timer again anyway

Change in memory:
Flash: -14 bytes
SRAM: 0 bytes
This commit is contained in:
Guðni Már Gilbert 2024-01-06 00:19:15 +00:00
parent 09952db139
commit ae31c0ec31
1 changed files with 1 additions and 1 deletions

View File

@ -9600,7 +9600,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
get_command();
}
if (blocks_queued() && GetPrinterState() == PrinterState::IsHostPrinting && usb_timer.elapsed() > ((USB_TIMER_TIMEOUT) / 2))
if (blocks_queued() && GetPrinterState() == PrinterState::IsHostPrinting && usb_timer.expired((USB_TIMER_TIMEOUT) / 2))
{
// Handle the case where planned moves may take a longer time to execute than the USB timer period.
// An example is the toolchange unload sequence generated by PrusaSlicer with default settings.