зеркало из https://github.com/mozilla/pjs.git
Bug 668355: s/Timer/AutoTimer/ r=jlebar
This commit is contained in:
Родитель
1033f8f05b
Коммит
b9177046be
|
@ -10993,7 +10993,7 @@ nsNavigator::GetBuildID(nsAString& aBuildID)
|
|||
NS_IMETHODIMP
|
||||
nsNavigator::JavaEnabled(PRBool *aReturn)
|
||||
{
|
||||
Telemetry::Timer<Telemetry::CHECK_JAVA_ENABLED> telemetryTimer;
|
||||
Telemetry::AutoTimer<Telemetry::CHECK_JAVA_ENABLED> telemetryTimer;
|
||||
// Return true if we have a handler for "application/x-java-vm",
|
||||
// otherwise return false.
|
||||
*aReturn = PR_FALSE;
|
||||
|
|
|
@ -2338,7 +2338,7 @@ nsresult nsPluginHost::LoadPlugins()
|
|||
// This is needed in ReloadPlugins to prevent possible recursive reloads
|
||||
nsresult nsPluginHost::FindPlugins(PRBool aCreatePluginList, PRBool * aPluginsChanged)
|
||||
{
|
||||
Telemetry::Timer<Telemetry::FIND_PLUGINS> telemetry;
|
||||
Telemetry::AutoTimer<Telemetry::FIND_PLUGINS> telemetry;
|
||||
// let's start timing if we are only really creating the plugin list
|
||||
if (aCreatePluginList) {
|
||||
NS_TIMELINE_START_TIMER("LoadPlugins");
|
||||
|
|
|
@ -62,14 +62,14 @@ HistogramCount
|
|||
void Accumulate(ID id, PRUint32 sample);
|
||||
|
||||
template<ID id>
|
||||
class Timer {
|
||||
class AutoTimer {
|
||||
public:
|
||||
Timer():
|
||||
AutoTimer():
|
||||
start(TimeStamp::Now())
|
||||
{
|
||||
}
|
||||
|
||||
~Timer() {
|
||||
~AutoTimer() {
|
||||
Accumulate(id, (TimeStamp::Now() - start).ToMilliseconds());
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче