27 #ifndef MESQUITE_TIMER_HPP
28 #define MESQUITE_TIMER_HPP
31 #pragma warning ( 4 : 4786)
37 #ifdef MSQ_USE_OLD_STD_HEADERS
46 #ifdef MSQ_USE_OLD_IO_HEADERS
130 Key add(
const msq_std::string &name,
bool fail_if_exists =
true);
134 Key get_key(
const msq_std::string &name)
const;
144 void remove(
const Key key);
145 void remove(
const msq_std::string &name)
150 void start(
const msq_std::string &name)
155 void stop(
const msq_std::string &name)
160 void reset(
const msq_std::string &name)
180 msq_std::vector< msq_std::pair<msq_std::string, StopWatch> >
mEntries;
204 void*
operator new(
size_t size);
209 #ifdef MSQ_USE_FUNCTION_TIMERS
210 #define MSQ_FUNCTION_TIMER( NAME ) \
211 static Mesquite::StopWatchCollection::Key _mesquite_timer_key = \
212 Mesquite::GlobalStopWatches.add( NAME, false ); \
213 FunctionTimer _mesquite_timer( _mesquite_timer_key ); \
214 _mesquite_timer.start()
216 #define MSQ_FUNCTION_TIMER( NAME )
Mesquite::StopWatchCollection GlobalStopWatches
void start(const msq_std::string &name)
void start(const Key key)
int number_of_starts() const
Returns the number of times this StopWatch has been started.
msq_std::string get_string(const Key key)
Gets the string associated with a key.
double since_last_check()
int number_of_stop_watches()
void print_timing_diagnostics(int debugflag)
Key get_key(const msq_std::string &name) const
double since_birth() const
FunctionTimer(StopWatchCollection::Key key)
void reset(const Key key)
double total_time(const msq_std::string &name) const
Key add(const msq_std::string &name, bool fail_if_exists=true)
StopWatchCollection::Key mKey
void get_keys_sorted_by_time(msq_std::vector< Key > &sorted_keys)
FunctionTimer & operator=(const FunctionTimer &)
void reset(const msq_std::string &name)
void stop(const msq_std::string &name)
void get_string(const Key key, msq_std::string &new_string)
Gets the string associated with a key.
msq_std::vector< msq_std::pair< msq_std::string, StopWatch > > mEntries
msq_stdio::ostream & operator<<(msq_stdio::ostream &s, const Matrix3D &A)
#define MSQ_DBGOUT(flag)
Check debug flag and return ostream associated with flag.
double total_time(const Key key) const
double total_time() const
int number_of_starts(const Key key) const
int number_of_starts(const msq_std::string &name) const