11.12.2024, 08:12
Map an event script to the input object and save the current timestamp in storage:
Then modify your timer script:
Code:
key = 'updatetime_' .. event.dst
time = os.time()
storage.set(key, time)
Then modify your timer script:
Code:
key = 'updatetime_' .. timer.input
time = storage.get(key, 0)
delta = os.time() - time