mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 21:59:07 +00:00
LibCore: Add factory to create and start a new ElapsedTimer
Simplifies one of the main usage patterns of the timer class.
This commit is contained in:
parent
500a3fb2a7
commit
a2ee387683
Notes:
sideshowbarker
2024-07-18 04:07:11 +09:00
Author: https://github.com/bgianfo
Commit: a2ee387683
Pull-request: https://github.com/SerenityOS/serenity/pull/9999
Reviewed-by: https://github.com/awesomekling ✅
2 changed files with 9 additions and 0 deletions
|
@ -13,6 +13,8 @@ namespace Core {
|
|||
|
||||
class ElapsedTimer {
|
||||
public:
|
||||
static ElapsedTimer start_new();
|
||||
|
||||
ElapsedTimer(bool precise = false)
|
||||
: m_precise(precise)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue