Index: src/libchcore/TSimpleTimer.h =================================================================== diff -u -r9b8cccbee0fcfeca28a112cc0253a7641f73f74f -rc8e73b75027d5e17fb8b1e1eb40e64f40fc62547 --- src/libchcore/TSimpleTimer.h (.../TSimpleTimer.h) (revision 9b8cccbee0fcfeca28a112cc0253a7641f73f74f) +++ src/libchcore/TSimpleTimer.h (.../TSimpleTimer.h) (revision c8e73b75027d5e17fb8b1e1eb40e64f40fc62547) @@ -24,23 +24,31 @@ BEGIN_CHCORE_NAMESPACE -class TSimpleTimer +class LIBCHCORE_API TSimpleTimer { public: TSimpleTimer(bool bAutostart = false, const ITimestampProviderPtr& spTimestampProvider = ITimestampProviderPtr()); ~TSimpleTimer(); + void Init(unsigned long long ullTotalTime); + void Start(); unsigned long long Stop(); // returns total time unsigned long long Tick(); // returns current timestamp + unsigned long long Checkpoint(); // returns current total time and restarts the timer + void Reset(); + bool IsRunning() const; unsigned long long GetTotalTime() const { return m_ullTotalTime; } unsigned long long GetLastTimestamp() const { return m_ullLastTime; } private: +#pragma warning(push) +#pragma warning(disable: 4251) ITimestampProviderPtr m_spTimestampProvider; +#pragma warning(pop) bool m_bStarted; unsigned long long m_ullTotalTime; // total time measured