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:
Brian Gianforcaro 2021-09-12 08:21:16 -07:00 committed by Brian Gianforcaro
commit a2ee387683
Notes: sideshowbarker 2024-07-18 04:07:11 +09:00
2 changed files with 9 additions and 0 deletions

View file

@ -13,6 +13,8 @@ namespace Core {
class ElapsedTimer {
public:
static ElapsedTimer start_new();
ElapsedTimer(bool precise = false)
: m_precise(precise)
{