diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-01-17 22:28:22 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-01-17 22:28:22 +0100 |
commit | 1ac56c2d11da5ffa44db23e1fd0c533d02ab2f66 (patch) | |
tree | 6eba7bed7de78a1efe65c23aeec28b1f93b3a2e5 /src/vim.h | |
parent | 3020ccb113d397ddf474001dc00a1916ad7abdee (diff) | |
download | vim-git-1ac56c2d11da5ffa44db23e1fd0c533d02ab2f66.tar.gz |
patch 8.1.0770: inconsistent use of ELAPSED_FUNCv8.1.0770
Problem: Inconsistent use of ELAPSED_FUNC.
Solution: Consistently use ELAPSED_FUNC. Also turn ELAPSED_TYPE into a
typedef. (Ozaki Kiichi, closes #3815)
Diffstat (limited to 'src/vim.h')
-rw-r--r-- | src/vim.h | 20 |
1 files changed, 9 insertions, 11 deletions
@@ -2625,17 +2625,15 @@ typedef enum { # define ELAPSED_TIMEVAL # define ELAPSED_INIT(v) gettimeofday(&v, NULL) # define ELAPSED_FUNC(v) elapsed(&v) -# define ELAPSED_TYPE struct timeval - long elapsed(struct timeval *start_tv); -#else -# if defined(WIN32) -# define ELAPSED_TICKCOUNT -# define ELAPSED_INIT(v) v = GetTickCount() -# define ELAPSED_FUNC(v) elapsed(v) -# define ELAPSED_TYPE DWORD -# ifndef PROTO - long elapsed(DWORD start_tick); -# endif +typedef struct timeval elapsed_T; +long elapsed(struct timeval *start_tv); +#elif defined(WIN32) +# define ELAPSED_TICKCOUNT +# define ELAPSED_INIT(v) v = GetTickCount() +# define ELAPSED_FUNC(v) elapsed(v) +typedef DWORD elapsed_T; +# ifndef PROTO +long elapsed(DWORD start_tick); # endif #endif |