diff options
author | mongo <andmarti@gmail.com> | 2017-04-28 17:11:08 -0300 |
---|---|---|
committer | mongo <andmarti@gmail.com> | 2017-04-28 17:11:08 -0300 |
commit | c00342ef22c3155611bcc28ddef33e341aa990c8 (patch) | |
tree | 6b111923860fd7d7905eea9a6aa18256661f0b8b /src/main.c | |
parent | 0e1bbd875ce0003296c6704395f4586fff2f9899 (diff) |
Added RUNTIME timer for autobackup
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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"))) { |