mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 18:19:03 +00:00
LibCore: Add ElapsedTimer::reset()
This commit is contained in:
parent
ae405ed2eb
commit
7c939c58b8
Notes:
sideshowbarker
2024-07-18 01:50:24 +09:00
Author: https://github.com/gmta
Commit: 7c939c58b8
Pull-request: https://github.com/SerenityOS/serenity/pull/10662
Reviewed-by: https://github.com/awesomekling
2 changed files with 7 additions and 0 deletions
|
@ -28,6 +28,12 @@ void ElapsedTimer::start()
|
|||
m_origin_time.tv_usec = now_spec.tv_nsec / 1000;
|
||||
}
|
||||
|
||||
void ElapsedTimer::reset()
|
||||
{
|
||||
m_valid = false;
|
||||
m_origin_time = { 0, 0 };
|
||||
}
|
||||
|
||||
int ElapsedTimer::elapsed() const
|
||||
{
|
||||
VERIFY(is_valid());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue