summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authormongo <andmarti@gmail.com>2017-04-28 17:11:08 -0300
committermongo <andmarti@gmail.com>2017-04-28 17:11:08 -0300
commitc00342ef22c3155611bcc28ddef33e341aa990c8 (patch)
tree6b111923860fd7d7905eea9a6aa18256661f0b8b /src/main.c
parent0e1bbd875ce0003296c6704395f4586fff2f9899 (diff)
Added RUNTIME timer for autobackup
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 6 insertions, 0 deletions
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(&current_tv, NULL);
// if we are in ncurses
if (! atoi(get_conf_value("nocurses"))) {