📄 ctimer.h
字号:
#ifndef _CTIMER_H#define _CTIMER_H// a class that can be used to "time" parts of programs// or as a general timer//// operations are://// Start() : starts the timer // Stop() : stops the timer// ElapsedTime() : returns the elapsed time between // start and the last stop// CumulativeTime(): returns cumulative total of all// "laps" (timed intervals), i.e., sum of// calls to ElapsedTime// Reset() : resets cumulative time to 0// so "removes" history of timer////class CTimer{ public: CTimer(); // constructor void Reset(); // reset timer to 0 void Start(); // begin timing void Stop(); // stop timing double ElapsedTime(); // between last start/stop double CumulativeTime(); // total of all times since reset private: long myStartTime,myEndTime; double myElapsed; // time since start and last stop double myCumulative; // cumulative of all "lap" times};#endif // _CTIMER_H not defined
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -