summaryrefslogtreecommitdiff
path: root/src/os_unix.c
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/os_unix.c
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/os_unix.c')
-rw-r--r--src/os_unix.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 04823a1e3..b8a92d930 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -374,7 +374,7 @@ mch_inchar(
long wait_time;
long elapsed_time = 0;
#ifdef ELAPSED_FUNC
- ELAPSED_TYPE start_tv;
+ elapsed_T start_tv;
ELAPSED_INIT(start_tv);
#endif
@@ -480,7 +480,7 @@ mch_inchar(
}
/* no character available */
-#if !(defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H))
+#ifndef ELAPSED_FUNC
/* estimate the elapsed time */
elapsed_time += wait_time;
#endif
@@ -1907,11 +1907,11 @@ get_x11_windis(void)
#ifdef SET_SIG_ALARM
RETSIGTYPE (*sig_save)();
#endif
-#if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
- struct timeval start_tv;
+#ifdef ELAPSED_FUNC
+ elapsed_T start_tv;
if (p_verbose > 0)
- gettimeofday(&start_tv, NULL);
+ ELAPSED_INIT(start_tv);
#endif
#ifdef SET_SIG_ALARM
@@ -4831,8 +4831,8 @@ mch_call_shell_fork(
int fromshell_fd;
garray_T ga;
int noread_cnt;
-# if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
- struct timeval start_tv;
+# ifdef ELAPSED_FUNC
+ elapsed_T start_tv;
# endif
# ifdef FEAT_GUI
@@ -6073,8 +6073,8 @@ RealWaitForChar(int fd, long msec, int *check_for_gpm UNUSED, int *interrupted)
# ifdef ELAPSED_FUNC
/* Remember at what time we started, so that we know how much longer we
* should wait after being interrupted. */
- long start_msec = msec;
- ELAPSED_TYPE start_tv;
+ long start_msec = msec;
+ elapsed_T start_tv;
if (msec > 0)
ELAPSED_INIT(start_tv);
@@ -7494,7 +7494,7 @@ setup_term_clip(void)
int (*oldIOhandler)();
#endif
# ifdef ELAPSED_FUNC
- ELAPSED_TYPE start_tv;
+ elapsed_T start_tv;
if (p_verbose > 0)
ELAPSED_INIT(start_tv);