📄 stowatch.cpp
字号:
// stowatch.cpp #include"stowatch.h"#include<cassert>#include <iostream>void Stopwatch::start(){ ftime(&starttime); state = running;}void Stopwatch::stop(){ ftime(&stoptime); state = halted;}double Stopwatch::duration(){ if(state == undefined) assert(!("Stopwatch not started!\n")); if (state == running) ftime(&stoptime); return double(stoptime.time - starttime.time) + double(stoptime.millitm - starttime.millitm)/1000.0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -