?? 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 + -