Guest User

Untitled

a guest
Dec 17th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. scriptencoding utf-8
  2.  
  3. function! s:benchmark() abort "{{{
  4. normal !gg
  5. call timer_start(0, function('s:callback', [reltime(), line('$')]), {'repeat': -1})
  6. endfunction "}}}
  7.  
  8. function! s:callback(time, lines, timer) abort "{{{
  9. if line('.') < a:lines
  10. execute 'normal!' "\<C-f>"
  11. return
  12. endif
  13. echomsg reltimestr(reltime(a:time))
  14. call timer_stop(a:timer)
  15. endfunction "}}}
  16.  
  17. command! -nargs=0 ScrollBench call s:benchmark()
Add Comment
Please, Sign In to add comment