summaryrefslogtreecommitdiff
path: root/src/vim.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-01-17 22:28:22 +0100
committerBram Moolenaar <Bram@vim.org>2019-01-17 22:28:22 +0100
commit1ac56c2d11da5ffa44db23e1fd0c533d02ab2f66 (patch)
tree6eba7bed7de78a1efe65c23aeec28b1f93b3a2e5 /src/vim.h
parent3020ccb113d397ddf474001dc00a1916ad7abdee (diff)
downloadvim-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.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/vim.h b/src/vim.h
index b11f1ccb9..9ae3b3081 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -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