T = Wherigo.ZTimer(cart)
T.Name="timer1"
T.Duration=1 -- sec
T.Type="Interval" -- "Interval", "Countdown"
T.startTime = nil
function T:OnTick()
if (T.startTime == nil) then
T.startTime = os.clock()
LOG("start_time = ", T.startTime)
end
LOG("now= ", os.clock())
LOG("now-start_time = ", os.difftime(os.clock(), T.startTime))
end
Emulator relusts:
20110318143359|51.47810|0.00000|0.000|1.000| start_time = 5.252
20110318143359|51.47810|0.00000|0.000|1.000| now= 5.252
20110318143359|51.47810|0.00000|0.000|1.000| now-start_time = 0
20110318143400|51.47810|0.00000|0.000|1.000| now= 6.271
20110318143400|51.47810|0.00000|0.000|1.000| now-start_time = 1
20110318143401|51.47810|0.00000|0.000|1.000| now= 7.283
20110318143401|51.47810|0.00000|0.000|1.000| now-start_time = 2
20110318143402|51.47810|0.00000|0.000|1.000| now= 8.296
20110318143402|51.47810|0.00000|0.000|1.000| now-start_time = 3
20110318143403|51.47810|0.00000|0.000|1.000| now= 9.312
20110318143403|51.47810|0.00000|0.000|1.000| now-start_time = 4
Garmin Oregon 300 results:
20110318143938|49.88224|16.29404|323.967|11.634| start_time = 913.42
20110318143938|49.88224|16.29404|323.967|11.634| now= 913.44
20110318143938|49.88224|16.29404|323.967|11.634| now-start_time = 0
20110318143939|49.88224|16.29405|324.435|11.329| now= 923.42
20110318143939|49.88224|16.29405|324.435|11.329| now-start_time = 10
20110318143940|49.88224|16.29405|324.958|11.080| now= 933.41
20110318143940|49.88224|16.29405|324.958|11.080| now-start_time = 20
20110318143941|49.88224|16.29405|325.314|10.778| now= 943.41
20110318143941|49.88224|16.29405|325.314|10.778| now-start_time = 30
20110318143942|49.88224|16.29406|325.466|10.519| now= 953.41
20110318143942|49.88224|16.29406|325.466|10.519| now-start_time = 40
20110318143943|49.88224|16.29407|325.680|10.273| now= 963.42
20110318143943|49.88224|16.29407|325.680|10.273| now-start_time = 50

Help









