0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.0770: inconsistent use of ELAPSED_FUNC

Problem:    Inconsistent use of ELAPSED_FUNC.
Solution:   Consistently use ELAPSED_FUNC.  Also turn ELAPSED_TYPE into a
            typedef. (Ozaki Kiichi, closes #3815)
This commit is contained in:
Bram Moolenaar
2019-01-17 22:28:22 +01:00
parent 3020ccb113
commit 1ac56c2d11
6 changed files with 26 additions and 26 deletions

View File

@@ -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