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:
Qingping Hou
2012-11-17 13:41:26 -05:00
parent b7e62491bc
commit d3e0424122
5 changed files with 89 additions and 37 deletions

View File

@@ -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