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

patch 7.4.1578

Problem:    There is no way to invoke a function later or periodically.
Solution:   Add timer support.
This commit is contained in:
Bram Moolenaar
2016-03-15 23:10:59 +01:00
parent ab1fa3955f
commit 975b5271ee
14 changed files with 438 additions and 18 deletions

View File

@@ -2953,3 +2953,18 @@ struct js_reader
void *js_cookie; /* can be used by js_fill */
};
typedef struct js_reader js_read_T;
typedef struct timer_S timer_T;
struct timer_S
{
int tr_id;
#ifdef FEAT_TIMERS
timer_T *tr_next;
timer_T *tr_prev;
proftime_T tr_due; /* when the callback is to be invoked */
int tr_repeat; /* number of times to repeat, -1 forever */
long tr_interval; /* only set when it repeats */
char_u *tr_callback; /* allocated */
partial_T *tr_partial;
#endif
};