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

📄 timer.c

📁 一个网络流量分析的完整的程序
💻 C
字号:
/***timer.c		- module to display the elapsed time since a facility		  was startedWritten by Gerard Paul JavaCopyright (c) Gerard Paul Java 1997This software is open source; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or(at your option) any later version.This program is distributed WITHOUT ANY WARRANTY; without even theimplied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the GNU General Public License in the included COPYING file fordetails.***/#include <curses.h>#include <time.h>void printelapsedtime(time_t start, time_t now, int y, int x, WINDOW * win){    time_t elapsed;    unsigned int hours;    unsigned int mins;    elapsed = now - start;    hours = elapsed / 3600;    mins = (elapsed % 3600) / 60;    wmove(win, y, x);    wprintw(win, " Elapsed time: %3u:%02u ", hours, mins);}

⌨️ 快捷键说明

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