patch 7.4.1578
Problem: There is no way to invoke a function later or periodically.
Solution: Add timer support.
diff --git a/src/structs.h b/src/structs.h
index ab707d8..6263242 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -2953,3 +2953,18 @@
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
+};