On Monday, March 14, 2016 at 12:07:07 AM UTC+9, Bram Moolenaar wrote:
> I have a note about adding a way that a callback can be invoked at a
> certain time. I would like to know how this is going to be used, what
> the requirements for this feature are.
>
> I imagine there are two kinds of timers:
>
> 1. One-time: After N msec the callback is invoked.
> 2. Repating: invoke the callback every N msec
>
> For both this will happen while waiting for a character, thus the actual
> wait time will be longer if the user is typing.
>
> Example:
>
> let timer = timer_add({time}, {callback} [, {repeats} [, {cookie}]])
> call timer_stop(timer)
>
> func MyTimerCallback(timer, cookie)
>
> Would that satisfy the need?
function! MyTimerCallback(timer, cookie)
echo getchar()
endfunction
let timer = timer_add({time}, {callback} [, {repeats} [, {cookie}]])
How will this work?
--
--
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.