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

📄 aftimer.h

📁 sleuthit-2.09 一个磁盘的工具集
💻 H
字号:
#ifndef __TIMER_H__#define __TIMER_H__#ifdef HAVE_SYS_TIME_H#include <sys/time.h>#endifclass aftimer {    bool used;				// was this timer used?    struct timeval t0;    bool running;    long total_sec;    long total_usec;    double lap_time_;			// time from when we last did a "stop"    char buf[64];			// internal time bufferpublic:    aftimer();    time_t tstart();    void start();    void stop();    double elapsed_seconds();		//    double lap_time();    static char *hms(char *b,long t);   // turn a number of seconds into hms    char *timer_text(char *buf);	// return the time spent reading, as text    char *timer_text();			// uses internal buffer    double eta(double fraction_done);	// calculate ETA in seconds, given fraction    char *eta_text(char *buf,double fraction_done);    char *eta_text(double fraction_done);};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -