mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 85e86b04035c (bug 1188616) for bustage.
CLOSED TREE
This commit is contained in:
parent
10ad51fb6a
commit
6babe48a33
@ -9,8 +9,6 @@
|
||||
#include "nsContentUtils.h"
|
||||
#include "CPOWTimer.h"
|
||||
|
||||
#include "jsapi.h"
|
||||
|
||||
CPOWTimer::CPOWTimer(JSContext* cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
|
||||
: cx_(nullptr)
|
||||
, startInterval_(0)
|
||||
@ -20,7 +18,7 @@ CPOWTimer::CPOWTimer(JSContext* cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
|
||||
if (!js::GetStopwatchIsMonitoringCPOW(runtime))
|
||||
return;
|
||||
cx_ = cx;
|
||||
startInterval_ = PR_Now();
|
||||
startInterval_ = PR_IntervalNow();
|
||||
}
|
||||
CPOWTimer::~CPOWTimer()
|
||||
{
|
||||
@ -35,12 +33,7 @@ CPOWTimer::~CPOWTimer()
|
||||
return;
|
||||
}
|
||||
|
||||
const int64_t endInterval = PR_Now();
|
||||
if (endInterval <= startInterval_) {
|
||||
// Do not assume monotonicity.
|
||||
return;
|
||||
}
|
||||
|
||||
js::PerformanceData* performance = js::GetPerformanceData(runtime);
|
||||
performance->totalCPOWTime += endInterval - startInterval_;
|
||||
uint64_t duration = PR_IntervalToMicroseconds(PR_IntervalNow() - startInterval_);
|
||||
performance->totalCPOWTime += duration;
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ class MOZ_STACK_CLASS CPOWTimer final {
|
||||
* The instant at which the stopwatch was started. Undefined
|
||||
* if CPOW monitoring was off when the timer was created.
|
||||
*/
|
||||
int64_t startInterval_;
|
||||
PRIntervalTime startInterval_;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user