From c00342ef22c3155611bcc28ddef33e341aa990c8 Mon Sep 17 00:00:00 2001 From: mongo Date: Fri, 28 Apr 2017 17:11:08 -0300 Subject: Added RUNTIME timer for autobackup --- src/main.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 90d0a04..6d9979c 100644 --- a/src/main.c +++ b/src/main.c @@ -85,6 +85,7 @@ struct dictionary * predefined_conf_d; struct history * commandline_history; struct history * insert_history; char stderr_buffer[1024] = ""; +struct timeval startup_tv, current_tv; //runtime timer void read_stdin(); extern char * rev; @@ -222,7 +223,12 @@ int main (int argc, char ** argv) { // change curmode to NORMAL_MODE chg_mode('.'); + // runtime timer + gettimeofday(&startup_tv, NULL); + while ( ! shall_quit && ! atoi(get_conf_value("quit_afterload"))) { + // save current time for runtime timer + gettimeofday(¤t_tv, NULL); // if we are in ncurses if (! atoi(get_conf_value("nocurses"))) { -- cgit v1.2.3