Commonly in BYOND you would implement these by using spawn(), delaying appropriately. The issue this has is this places the procedure into the care of the BYOND scheduler, where it cannot be subsequently cancelled until it executes. Many spawn()ed procedures place an un-necessary burden on the BYOND scheduler, which has other duties to perform.
Having a separate event scheduler (or many) written in DM allows the programmer more flexibility on what gets executed, what can be cancelled, freezing all events that are scheduled and so on. This library provides a general mechanism to do just that.
Please bear in mind this library is new, and will develop a more rounded set of features as time progresses.
The library currently supports the following:
- Scheduling events
- Cancelling events
- Starting and stopping schedulers, to "freeze" event firing
- Events scheduled in multiple schedulers at once
- Re-scheduling events
- Event priority (the higher the priority, the more important the event)
- Some common event types, such as Periodic Timers
This library depends on the following libraries, and requires that you download them first. An include.txt file is provided, so if you download via the BYOND pager, these are automatically included: