📄 time.h
字号:
#ifndef Time_h#define Time_h#include <sys/time.h>#include <unistd.h>class Time{ struct timeval old,tv;public: Time() { gettimeofday(&tv,0); } explicit Time(int t) { usleep(t); } long seed() { return tv.tv_usec; } long stop() { old = tv; gettimeofday(&tv,0); return (tv.tv_sec - old.tv_sec)*1000000 + tv.tv_usec - old.tv_usec; }};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -