Thursday, October 21, 2010

Re: time a script

On Oct 21, 2:41 pm, ZyX <zyx....@gmail.com> wrote:
> BTW, what exactly were you passing as a:fu? If it is a function reference (or a
> string with function name)...

Ah, the word "string" got me thinking and now it works!

function! Time(fu)
let start = reltime()
execute a:fu
echo reltimestr(reltime(start))
endfun

:call Time(':call RndTest01a(1, 10, 5000)')

Thank you for the hint.

--
You received this message from the "vim_use" 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

No comments: