mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
add setTimeOut method in inputevent.lua
adapt all the state machine to use setTimeOut. Now supported gestures includes tap, double tap and hold.
This commit is contained in:
@@ -10,6 +10,9 @@ function TimeVal:new(o)
|
||||
end
|
||||
if o.usec == nil then
|
||||
o.usec = 0
|
||||
elseif o.usec > 1000000 then
|
||||
o.sec = o.sec + maht.floor(o.usec/1000000)
|
||||
o.usec = o.usec % 1000000
|
||||
end
|
||||
setmetatable(o, self)
|
||||
self.__index = self
|
||||
|
||||
Reference in New Issue
Block a user