mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 668355: s/Timer/AutoTimer/ r=jlebar
This commit is contained in:
parent
5555f4736c
commit
1aac4a3f9c
@ -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());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user