Skip to content

AmsTimer

Returned by server.after(). A timer schedules a callable without blocking the current event, and avoids executing the callback after the server stops or its amscript runtime reloads

View the source

Ends the timer and does not execute function

AttributeTypeDescription
timer.delayint / floatDelay in seconds
timer.functioncallableScheduled callable
timer.argumentsdictPositional and keyword arguments passed to the callable
timer = server.after(10, server.log, 'Hello from the future!')
# Cancel before execution if no longer needed
timer.cancel()