diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-11-24 17:22:50 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-11-24 17:22:50 +0100 |
commit | 833eb1d752426689051bf2001083359899536939 (patch) | |
tree | f91eeead037b689d8d02bd1e47704332a63d7de0 /src/vim.h | |
parent | 2cab0e191055a8145ccd46cd52869fbb9798b971 (diff) | |
download | vim-git-833eb1d752426689051bf2001083359899536939.tar.gz |
patch 8.0.0097v8.0.0097
Problem: When a channel callback consumes a lot of time Vim becomes
unresponsive. (skywind)
Solution: Bail out of checking channel readahead after 100 msec.
Diffstat (limited to 'src/vim.h')
-rw-r--r-- | src/vim.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -2503,4 +2503,20 @@ typedef enum # define OPEN_CHR_FILES #endif +#if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H) +# 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 + long elapsed(DWORD start_tick); +# endif +#endif + #endif /* VIM__H */ |