Live Event Scheduler
3522 Views
-
using { /Verse.org/SceneGraph } using { /Verse.org/Simulation } using { /Fortnite.com/Devices } # Strategy interface for event scheduling schedule_strategy<public> := interface<castable>(p_interface): ScheduleEvent<public>(Event:live_event)<suspends>:void <# Sleep strategy: Sleeps until event time Note: Sleep() uses simulation time, so server lag can cause delays #> sleep_schedule_strategy<public> := class<concrete>(schedule_strategy): ScheduleEvent<override>(Event:live_event)<suspends>:void= # If recurring event timestamp is in the past, jump to next future occurrence if (RecurInterval := Event.RecurEvery?): CurrentTime := GetSecondsSinceEpoch() if (Event.Timestamp < CurrentTime): TimeSinceStart := CurrentTime - Event.Timestamp PeriodsToAdd := Ceil[TimeSinceStart / RecurInterval] or 1 set Event.Timestamp = Event.Timestamp + (PeriodsToAdd * RecurInterval)
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.