Hi Nikolay! On Fr, 05 Aug 2016, Nikolay Aleksandrovich Pavlov wrote:
> 2016-08-05 0:09 GMT+03:00 Christian Brabandt <[email protected]>: > > Hi Bram! > > > > On Do, 04 Aug 2016, Bram Moolenaar wrote: > > > >> Christian Brabandt wrote: > >> > Hi, > >> > we have a timer_start() and a timer_stop() function. > >> > Shouldn't we also have a function that returns the status of a timer? > >> > And perhaps a way to query all active timers? Something like > >> > timer_get([id])? And perhaps a way to modify an active timer, like > >> > timer_modify(id)? > >> > >> Are there examples of practical use? > > > > I have been writing a plugin that uses timers. And among the thing > > I would like to have are: > > > > - Disable a particular timer temporarily > > - Modify the time parameter for a particular timer > > - Find out, what timers are currently active (helps for debugging in > > case of problems) > > - Change the callback function or repeat parameter depending on the > > users configuration > > Disable/modify/change can be implemented on top of > timer_start()/timer_stop(): just remove the timer and readd for > modify/change or when it needs to be enabled. I do not find > timer_modify() useful enough to have it coded in C. yeah, that's my current workaround. > Function that gets a list of all timers would be useful. Yes, and perhaps a timer_stop('ALL'), so the user can, just in case something went wrong, disable all active timers. But then we would also need the possibility to check, whether a timer is still active... Best, Christian -- Wie man sein Kind nicht nennen sollte: Thor Schluß -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
