diff options
Diffstat (limited to 'src/undo.c')
-rw-r--r-- | src/undo.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/undo.c b/src/undo.c index 71e62a199..bb5c73da2 100644 --- a/src/undo.c +++ b/src/undo.c @@ -534,7 +534,7 @@ u_savecommon( uhp->uh_seq = ++curbuf->b_u_seq_last; curbuf->b_u_seq_cur = uhp->uh_seq; - uhp->uh_time = time(NULL); + uhp->uh_time = vim_time(); uhp->uh_save_nr = 0; curbuf->b_u_time_cur = uhp->uh_time + 1; @@ -2350,7 +2350,7 @@ undo_time( else { if (dosec) - closest = (long)(time(NULL) - starttime + 1); + closest = (long)(vim_time() - starttime + 1); else if (dofile) closest = curbuf->b_u_save_nr_last + 2; else @@ -3104,10 +3104,10 @@ u_add_time(char_u *buf, size_t buflen, time_t tt) #ifdef HAVE_STRFTIME struct tm *curtime; - if (time(NULL) - tt >= 100) + if (vim_time() - tt >= 100) { curtime = localtime(&tt); - if (time(NULL) - tt < (60L * 60L * 12L)) + if (vim_time() - tt < (60L * 60L * 12L)) /* within 12 hours */ (void)strftime((char *)buf, buflen, "%H:%M:%S", curtime); else @@ -3117,7 +3117,7 @@ u_add_time(char_u *buf, size_t buflen, time_t tt) else #endif vim_snprintf((char *)buf, buflen, _("%ld seconds ago"), - (long)(time(NULL) - tt)); + (long)(vim_time() - tt)); } /* |