When i use the timer.performWithDelay, the method is immediately called, even though i have a timer. For example:
--Main class local water = require ("water") water.start() timer.performWithDelay(100000, water:stop(), -1)
Water:stop() is immediately called, even though it should be called 100 seconds after
--Variables that set water modes/ class variable local class = {} --function to start the water stream function class:start() continue = true end --fucntion to end the water stream function class:stop() continue = false print("stop") end
My console, upon running the app, immediately shows “stop”, indicating that the method stop had been called.
Why is it doing this?