mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:27:45 +00:00
LibCore: Add ElapsedTimer::elapsed_milliseconds()
It does the same thing as elapsed(), but has a clearer name. The hope is we'll move everything to the new name over time and then remove the old name.
This commit is contained in:
parent
655d9d1462
commit
197c5729d1
2 changed files with 8 additions and 2 deletions
|
@ -29,7 +29,7 @@ void ElapsedTimer::reset()
|
||||||
m_origin_time = {};
|
m_origin_time = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
i64 ElapsedTimer::elapsed() const
|
i64 ElapsedTimer::elapsed_milliseconds() const
|
||||||
{
|
{
|
||||||
return elapsed_time().to_milliseconds();
|
return elapsed_time().to_milliseconds();
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,9 +23,15 @@ public:
|
||||||
void start();
|
void start();
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
i64 elapsed() const; // milliseconds
|
i64 elapsed_milliseconds() const;
|
||||||
Time elapsed_time() const;
|
Time elapsed_time() const;
|
||||||
|
|
||||||
|
// FIXME: Move callers to elapsed_milliseconds(), remove this.
|
||||||
|
i64 elapsed() const // milliseconds
|
||||||
|
{
|
||||||
|
return elapsed_milliseconds();
|
||||||
|
}
|
||||||
|
|
||||||
Time const& origin_time() const { return m_origin_time; }
|
Time const& origin_time() const { return m_origin_time; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue