diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-08-07 18:22:53 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-08-07 18:22:53 +0200 |
commit | b73598e2f022a22fec512ea681c70d2775e8fd87 (patch) | |
tree | c233c50104f05d5e4830d56f7f04ce7d6f1e2fad /src/testdir/shared.vim | |
parent | e4a76ad0e74a31bbd9f1b1ac5b816d714d19a412 (diff) | |
download | vim-git-b73598e2f022a22fec512ea681c70d2775e8fd87.tar.gz |
patch 7.4.2180v7.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().
Diffstat (limited to 'src/testdir/shared.vim')
-rw-r--r-- | src/testdir/shared.vim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/testdir/shared.vim b/src/testdir/shared.vim index ad8afe1ff..aba428a46 100644 --- 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 |