27 #ifndef __SBTIMINGSERVICE_H__
28 #define __SBTIMINGSERVICE_H__
30 #include <sbITimingService.h>
33 #include <nsIObserver.h>
34 #include <nsIGenericFactory.h>
36 #include <nsAutoLock.h>
38 #include <nsInterfaceHashtable.h>
39 #include <nsStringGlue.h>
40 #include <nsTHashtable.h>
56 nsresult
Init(
const nsAString &aTimerName);
75 NS_DECL_SBITIMINGSERVICE
80 static NS_METHOD
RegisterSelf(nsIComponentManager* aCompMgr,
82 const char* aLoaderStr,
84 const nsModuleComponentInfo *aInfo);
91 PRLock * mLoggingLock;
92 PRBool mLoggingEnabled;
93 nsCOMPtr<nsIFile> mLogFile;
100 nsInterfaceHashtableMT<nsStringHashKey, sbITimingServiceTimer> mTimers;
104 PRLock *mResultsLock;
106 nsInterfaceHashtableMT<nsUint32HashKey, sbITimingServiceTimer> mResults;
NS_DECL_ISUPPORTS NS_DECL_NSIOBSERVER NS_DECL_SBITIMINGSERVICE sbTimingService()
nsresult FormatResultsToString(nsACString &aOutput)
static NS_METHOD RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aPath, const char *aLoaderStr, const char *aType, const nsModuleComponentInfo *aInfo)
An interface for running simple, time based, profiling.
NS_DECL_ISUPPORTS NS_DECL_SBITIMINGSERVICETIMER
nsresult Init(const nsAString &aTimerName)