Mercurial > vim
diff src/testdir/shared.vim @ 9810:6a28d0c6f929 v7.4.2180
commit https://github.com/vim/vim/commit/b73598e2f022a22fec512ea681c70d2775e8fd87
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 7 18:22:53 2016 +0200
patch 7.4.2180
Problem: There is no easy way to stop all timers. There is no way to
temporary pause a timer.
Solution: Add timer_stopall() and timer_pause().
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 07 Aug 2016 18:30:05 +0200 |
parents | 108b62925cb0 |
children | 5c288e5e1493 |
line wrap: on
line diff
--- a/src/testdir/shared.vim +++ b/src/testdir/shared.vim @@ -109,14 +109,17 @@ func s:kill_server(cmd) endfunc " Wait for up to a second for "expr" to become true. +" Return time slept in milliseconds. func WaitFor(expr) + let slept = 0 for i in range(100) try if eval(a:expr) - return + return slept endif catch endtry + let slept += 10 sleep 10m endfor endfunc