- Export stopwatch.h in windows regardless of whether MOZ_PERF is set.
- Move over macros for using the stopwatch class into stopwatch.h so that they can be shared by all the users of the stopwatch. git-svn-id: svn://10.0.0.236/trunk@47480 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -20,9 +20,7 @@
|
||||
|
||||
MODULE=util
|
||||
DEPTH=..\..\..
|
||||
EXPORTS=xp_obs.h \
|
||||
!if defined(MOZ_PERF)
|
||||
stopwatch.h
|
||||
!endif
|
||||
EXPORTS=xp_obs.h stopwatch.h
|
||||
|
||||
|
||||
!include $(DEPTH)\config\rules.mak
|
||||
|
||||
@@ -1,5 +1,29 @@
|
||||
const double gTicks = 1.0e-7;
|
||||
|
||||
#ifdef RAPTOR_PERF_METRICS
|
||||
# define NS_RESET_AND_START_STOPWATCH(_sw) \
|
||||
_sw.Start(PR_TRUE);
|
||||
|
||||
# define NS_START_STOPWATCH(_sw) \
|
||||
_sw.Start(PR_FALSE);
|
||||
|
||||
# define NS_STOP_STOPWATCH(_sw) \
|
||||
_sw.Stop();
|
||||
|
||||
# define NS_SAVE_STOPWATCH_STATE(_sw) \
|
||||
_sw.SaveState();
|
||||
|
||||
# define NS_RESTORE_STOPWATCH_STATE(_sw) \
|
||||
_sw.RestoreState();
|
||||
|
||||
#else
|
||||
# define NS_RESET_AND_START_STOPWATCH(_sw)
|
||||
# define NS_START_STOPWATCH(_sw)
|
||||
# define NS_STOP_STOPWATCH(_sw)
|
||||
# define NS_SAVE_STOPWATCH_STATE(_sw)
|
||||
# define NS_RESTORE_STOPWATCH_STATE(_sw)
|
||||
#endif
|
||||
|
||||
class Stopwatch {
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user