1
0
mirror of https://github.com/gryf/tagbar.git synced 2025-12-17 11:30:28 +01:00

Better timestamps

This commit is contained in:
Jan Larres
2014-04-04 00:31:27 +13:00
parent be46ee5988
commit 8a139e0576

View File

@@ -3891,10 +3891,20 @@ function! s:StopDebug() abort
endfunction
" s:LogDebugMessage() {{{2
if has('reltime')
function! s:gettime() abort
let time = split(reltimestr(reltime()), '\.')
return strftime('%Y-%m-%d %H:%M:%S.', time[0]) . time[1]
endfunction
else
function! s:gettime() abort
return strftime('%Y-%m-%d %H:%M:%S')
endfunction
endif
function! s:LogDebugMessage(msg) abort
if s:debug
execute 'redir >> ' . s:debug_file
silent echon strftime('%H:%M:%S') . ': ' . a:msg . "\n"
silent echon s:gettime() . ': ' . a:msg . "\n"
redir END
endif
endfunction