Prusa3d Marlin fork
|
#include <stopwatch.h>
Static Public Member Functions | |
static FORCE_INLINE void | init () |
Initialize the stopwatch. | |
static bool | stop () |
Stop the stopwatch. More... | |
static bool | abort () |
static bool | pause () |
Pause the stopwatch. More... | |
static bool | start () |
Start the stopwatch. More... | |
static void | resume (const uint32_t with_time) |
Resume the stopwatch. More... | |
static void | reset () |
Reset the stopwatch. More... | |
static FORCE_INLINE bool | isRunning () |
Check if the timer is running. More... | |
static FORCE_INLINE bool | isPaused () |
Check if the timer is paused. More... | |
static uint32_t | duration () |
Get the running time. More... | |
NOTE: this file has been changed in order to compile & run on Prusa-Firmware https://github.com/prusa3d/Prusa-Firmware
Marlin 3D Printer Firmware Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
Based on Sprinter and grbl. Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
This class acts as a timer proving stopwatch functionality including the ability to pause the running time counter.
|
static |
Return the total number of seconds the timer has been running.
|
inlinestatic |
Return true if the timer is currently paused, false otherwise.
|
inlinestatic |
Return true if the timer is currently running, false otherwise.
|
static |
Pause the running timer, it will silently ignore the request if no timer is currently running.
|
static |
Reset all settings to their default values.
|
static |
Resume a timer from a given duration
|
static |
Start the timer, it will silently ignore the request if the timer is already running.
|
static |
Stop the running timer, it will silently ignore the request if no timer is currently running.