Open 3D Engine AzCore API Reference  2305.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::ScheduledEventHandle Struct Reference

#include <ScheduledEventHandle.h>

Public Member Functions

 ScheduledEventHandle ()=default
 Default constructor for AZStd::deque compatibility.
 
 ScheduledEventHandle (TimeMs executeTimeMs, TimeMs durationTimeMs, ScheduledEvent *scheduledEvent, bool ownsScheduledEvent=false)
 
bool operator> (const ScheduledEventHandle &rhs) const
 
bool Notify ()
 
TimeMs GetExecuteTimeMs () const
 
TimeMs GetDurationTimeMs () const
 
bool GetOwnsScheduledEvent () const
 
ScheduledEventGetScheduledEvent () const
 
void Clear ()
 Used internally to clear the event associated with this handle.
 

Detailed Description

This is a handle class that wraps a scheduled event. This is created inside of EventSchedulerSystemComponent and deleted in EventSchedulerSystemComponent::OnTick()

Constructor & Destructor Documentation

AZ::ScheduledEventHandle::ScheduledEventHandle ( TimeMs  executeTimeMs,
TimeMs  durationTimeMs,
ScheduledEvent scheduledEvent,
bool  ownsScheduledEvent = false 
)

Constructor of ScheduledEventHandle struct.

Parameters
executeTimeMsan absolute time in ms at which point the scheduled event should trigger
durationTimeMsthe interval time in ms used for prioritization as well as re-queueing
scheduledEventa scheduled event to run
ownsScheduledEventtrue if the event handle owns its own scheduled event instance

Member Function Documentation

TimeMs AZ::ScheduledEventHandle::GetDurationTimeMs ( ) const

Get the duration time in ms for this scheduled event. This is the time between queuing and triggering, not how long the event is expected to execute for

Returns
the duration time in ms for this scheduled event
TimeMs AZ::ScheduledEventHandle::GetExecuteTimeMs ( ) const

Get the execution time in ms for this scheduled event.

Returns
the execution time in ms for this scheduled event
bool AZ::ScheduledEventHandle::GetOwnsScheduledEvent ( ) const

Gets whether or not the event handle owns its own scheduled event.

Returns
true if the event handle owns
ScheduledEvent* AZ::ScheduledEventHandle::GetScheduledEvent ( ) const

Gets the scheduled event instance bound to this event handle.

Returns
the scheduled event instance bound to this event handle
bool AZ::ScheduledEventHandle::Notify ( )

Run a callback function.

Returns
true for re-queuing a scheduled event or false for deleting this class.
bool AZ::ScheduledEventHandle::operator> ( const ScheduledEventHandle rhs) const

operator of comparing a scheduled event by execute time.

Parameters
a_Rhsa scheduled event handle to compare

The documentation for this struct was generated from the following file: