mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
Bug 672426 - Use GUARD_OBJECT macros in Telemetry::AutoTimer, r=taras
This commit is contained in:
parent
7009ed3222
commit
c9bf6bbe17
@ -40,6 +40,7 @@
|
||||
#define Telemetry_h__
|
||||
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "mozilla/AutoRestore.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace Telemetry {
|
||||
@ -64,9 +65,10 @@ void Accumulate(ID id, PRUint32 sample);
|
||||
template<ID id>
|
||||
class AutoTimer {
|
||||
public:
|
||||
AutoTimer():
|
||||
start(TimeStamp::Now())
|
||||
AutoTimer(MOZILLA_GUARD_OBJECT_NOTIFIER_ONLY_PARAM)
|
||||
: start(TimeStamp::Now())
|
||||
{
|
||||
MOZILLA_GUARD_OBJECT_NOTIFIER_INIT;
|
||||
}
|
||||
|
||||
~AutoTimer() {
|
||||
@ -75,6 +77,7 @@ public:
|
||||
|
||||
private:
|
||||
const TimeStamp start;
|
||||
MOZILLA_DECL_USE_GUARD_OBJECT_NOTIFIER
|
||||
};
|
||||
} // namespace Telemetry
|
||||
} // namespace mozilla
|
||||
|
Loading…
x
Reference in New Issue
Block a user