diff --git a/src/proto/time.pro b/src/proto/time.pro index 9d6d9e962a..7e44bca1b7 100644 --- a/src/proto/time.pro +++ b/src/proto/time.pro @@ -20,9 +20,6 @@ void f_timer_pause(typval_T *argvars, typval_T *rettv); void f_timer_start(typval_T *argvars, typval_T *rettv); void f_timer_stop(typval_T *argvars, typval_T *rettv); void f_timer_stopall(typval_T *argvars, typval_T *rettv); -#if (defined(MSWIN) || defined(__MINGW32__)) && !defined(FEAT_RUBY) -int gettimeofday(struct timeval *tv, char *dummy); -#endif void time_push(void *tv_rel, void *tv_start); void time_pop(void *tp); void time_msg(char *mesg, void *tv_start); diff --git a/src/time.c b/src/time.c index 830a94cd61..2fb0c39317 100644 --- a/src/time.c +++ b/src/time.c @@ -127,21 +127,6 @@ get_ctime(time_t thetime, int add_newline) return buf; } -// Ruby has its own version of gettimeofday -#if (defined(MSWIN) || defined(__MINGW32__)) && !defined(FEAT_RUBY) -/* - * Windows doesn't have gettimeofday(), although it does have struct timeval. - */ - int -gettimeofday(struct timeval *tv, char *dummy UNUSED) -{ - long t = clock(); - tv->tv_sec = t / CLOCKS_PER_SEC; - tv->tv_usec = (t - tv->tv_sec * CLOCKS_PER_SEC) * 1000000 / CLOCKS_PER_SEC; - return 0; -} -#endif - #if defined(FEAT_EVAL) || defined(PROTO) #if defined(MACOS_X) @@ -962,6 +947,20 @@ f_timer_stopall(typval_T *argvars UNUSED, typval_T *rettv UNUSED) # if defined(STARTUPTIME) || defined(PROTO) static struct timeval prev_timeval; +# ifdef MSWIN +/* + * Windows doesn't have gettimeofday(), although it does have struct timeval. + */ + static int +gettimeofday(struct timeval *tv, char *dummy UNUSED) +{ + long t = clock(); + tv->tv_sec = t / CLOCKS_PER_SEC; + tv->tv_usec = (t - tv->tv_sec * CLOCKS_PER_SEC) * 1000000 / CLOCKS_PER_SEC; + return 0; +} +# endif + /* * Save the previous time before doing something that could nest. * set "*tv_rel" to the time elapsed so far. diff --git a/src/version.c b/src/version.c index a32324fd95..2ce3628bf1 100644 --- a/src/version.c +++ b/src/version.c @@ -724,6 +724,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1721, /**/ 1720, /**/