⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stowatch.cpp

📁 Design Componenet With C++ STL配套书源代码
💻 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 + -