diff options
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_profile.vim | 9 | ||||
-rw-r--r-- | src/testdir/test_sleep.vim | 6 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/testdir/test_profile.vim b/src/testdir/test_profile.vim index e427179eae..534cc768c4 100644 --- a/src/testdir/test_profile.vim +++ b/src/testdir/test_profile.vim @@ -6,8 +6,13 @@ CheckFeature profile source shared.vim source screendump.vim -let s:header = 'count total (s) self (s)' -let s:header_func = 'count total (s) self (s) function' +if has('prof_nsec') + let s:header = 'count total (s) self (s)' + let s:header_func = 'count total (s) self (s) function' +else + let s:header = 'count total (s) self (s)' + let s:header_func = 'count total (s) self (s) function' +endif func Test_profile_func() call RunProfileFunc('func', 'let', 'let') diff --git a/src/testdir/test_sleep.vim b/src/testdir/test_sleep.vim index a428f380b0..4326877bd6 100644 --- a/src/testdir/test_sleep.vim +++ b/src/testdir/test_sleep.vim @@ -1,11 +1,7 @@ " Test for sleep and sleep! commands func! s:get_time_ms() - let timestr = reltimestr(reltime()) - let dotidx = stridx(timestr, '.') - let sec = str2nr(timestr[:dotidx]) - let msec = str2nr(timestr[dotidx + 1:]) - return (sec * 1000) + (msec / 1000) + return float2nr(reltimefloat(reltime()) * 1000) endfunc func! s:assert_takes_longer(cmd, time_ms) |