- 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:
nisheeth%netscape.com
1999-09-15 00:27:56 +00:00
parent 00cd331c58
commit 28666cb063
2 changed files with 26 additions and 4 deletions

View File

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

View File

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