Bug 668355: s/Timer/AutoTimer/ r=jlebar

This commit is contained in:
Taras Glek 2011-07-01 14:39:17 -07:00
parent 5555f4736c
commit 1aac4a3f9c
3 changed files with 5 additions and 5 deletions

View File

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

View File

@ -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");

View File

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