capt_get_packet(): check for key press only every 20ms
[iptraf-ng.git] / src / timer.c
bloba1f7fd5fedd112338913f8d61312ed1403a43e97
1 /* For terms of usage/redistribution/modification see the LICENSE file */
2 /* For authors and contributors see the AUTHORS file */
4 /***
6 timer.c - module to display the elapsed time since a facility
7 was started
9 ***/
11 #include "iptraf-ng-compat.h"
13 void printelapsedtime(time_t elapsed, int x, WINDOW *win)
15 unsigned int hours = elapsed / 3600;
16 unsigned int mins = (elapsed % 3600) / 60;
18 int y = getmaxy(win) - 1;
20 mvwprintw(win, y, x, " Time: %3u:%02u ", hours, mins);