Backed out changeset 85e86b04035c (bug 1188616) for bustage.

CLOSED TREE
This commit is contained in:
Ryan VanderMeulen 2015-08-03 10:18:20 -04:00
parent 10ad51fb6a
commit 6babe48a33
2 changed files with 4 additions and 11 deletions

View File

@ -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;
}

View File

@ -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