Table of Contents

Struct FrameHandle

Namespace
Uncreated.Warfare.Util.Timing
Assembly
Uncreated.Warfare.dll

Allows capturing the current frame and later checking if something happened in the same frame.

public readonly struct FrameHandle
Inherited Members

Constructors

FrameHandle()

[Obsolete("Use FrameHandle.Claim instead.", true)]
public FrameHandle()

Properties

IsValid

If the handle was ever initialized. Use IsActive() to check if it is from the current frame.

public bool IsValid { get; }

Property Value

bool

Methods

AssertActive()

Check if this FrameHandle was created in the current frame, otherwise throw an exception.

public void AssertActive()

Exceptions

GameThreadException
FrameExpiredException

Claim()

Create a new frame handle for the current frame that can be used to check that the frame is still current later on.

public static FrameHandle Claim()

Returns

FrameHandle

Exceptions

GameThreadException

IsActive()

Check if this FrameHandle was created in the current frame.

public bool IsActive()

Returns

bool

Exceptions

GameThreadException