Bug 1921288 - Add a way to get the associated duration type from TimeStamp and AwakeTimeStamp. r=gsvelto

Differential Revision: https://phabricator.services.mozilla.com/D223792
This commit is contained in:
Paul Adenot 2024-10-02 16:01:04 +00:00
parent badc695bfb
commit e3c35ceb52
2 changed files with 2 additions and 0 deletions

View File

@ -30,6 +30,7 @@ class AwakeTimeDuration;
// methods are equivalent on non-Windows.
class AwakeTimeStamp {
public:
using DurationType = AwakeTimeDuration;
MFBT_API static AwakeTimeStamp NowLoRes();
MFBT_API static AwakeTimeStamp Now();
MFBT_API void operator+=(const AwakeTimeDuration& aOther);

View File

@ -387,6 +387,7 @@ static_assert(sizeof(TimeStampValue) > 8);
*/
class TimeStamp {
public:
using DurationType = TimeDuration;
/**
* Initialize to the "null" moment
*/