prevent writing to data file more than once in 5 seconds

This commit is contained in:
Alan Hamlett 2013-07-10 00:21:47 -07:00
parent 0860980e16
commit 02ad6aa5ce

View file

@ -181,7 +181,9 @@ let s:VERSION = '0.2.1'
call s:Api(targetFile, now, last[0], 0, last)
endif
else
call s:SetLastAction(last[0], targetFile)
if now - last[1] > 5:
call s:SetLastAction(last[0], targetFile)
endif
endif
endfunction