Skip to content

KernelAPI reference

Struct FrameSample

Namespace: MicroEngine.Core
Assembly: MicroEngine.dll
Guide: Game lifecycle and time

One frame as FrameProfiler measured it. Times are in milliseconds.

C#
public readonly struct FrameSample : IEquatable<FrameSample>

Implements

IEquatable<FrameSample>

Constructors

FrameSample(double, double, double, double, double, int, double, double, long, int)

One frame as FrameProfiler measured it. Times are in milliseconds.

C#
public FrameSample(double Interval, double Events, double Update, double Render, double Present, int Steps, double SimulatedTime, double InterpolatedTime, long Allocated, int Collections)

Parameters

Interval double

Time from the start of the previous frame to the start of this one (0 for the first frame).

Events double

Polling system events (PumpEvents).

Update double

Running the fixed steps of this frame.

Render double

The game drawing its frame (BeginFrame and the scenes).

Present double

Finishing and presenting the frame (EndFrame); with VSync on, this is mostly the wait for the display.

Steps int

Fixed steps run in this frame.

SimulatedTime double

Seconds of game time after the frame’s last step (Time).

InterpolatedTime double

Seconds of game time a game drawing with FrameBlend shows.

Allocated long

Bytes the loop’s thread allocated during the frame.

Collections int

Garbage collections (any generation) that happened during the frame.

Properties

Allocated

Bytes the loop’s thread allocated during the frame.

C#
public long Allocated { get; init; }

Property Value

long

Collections

Garbage collections (any generation) that happened during the frame.

C#
public int Collections { get; init; }

Property Value

int

Events

Polling system events (PumpEvents).

C#
public double Events { get; init; }

Property Value

double

InterpolatedTime

Seconds of game time a game drawing with FrameBlend shows.

C#
public double InterpolatedTime { get; init; }

Property Value

double

Interval

Time from the start of the previous frame to the start of this one (0 for the first frame).

C#
public double Interval { get; init; }

Property Value

double

Present

Finishing and presenting the frame (EndFrame); with VSync on, this is mostly the wait for the display.

C#
public double Present { get; init; }

Property Value

double

Render

The game drawing its frame (BeginFrame and the scenes).

C#
public double Render { get; init; }

Property Value

double

SimulatedTime

Seconds of game time after the frame’s last step (Time).

C#
public double SimulatedTime { get; init; }

Property Value

double

Steps

Fixed steps run in this frame.

C#
public int Steps { get; init; }

Property Value

int

Update

Running the fixed steps of this frame.

C#
public double Update { get; init; }

Property Value

double

Methods

Deconstruct(out double, out double, out double, out double, out double, out int, out double, out double, out long, out int)

C#
public void Deconstruct(out double Interval, out double Events, out double Update, out double Render, out double Present, out int Steps, out double SimulatedTime, out double InterpolatedTime, out long Allocated, out int Collections)

Parameters

Interval double

Events double

Update double

Render double

Present double

Steps int

SimulatedTime double

InterpolatedTime double

Allocated long

Collections int

Equals(object)

C#
public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(FrameSample)

C#
public bool Equals(FrameSample other)

Parameters

other FrameSample

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(FrameSample, FrameSample)

C#
public static bool operator ==(FrameSample left, FrameSample right)

Parameters

left FrameSample

right FrameSample

Returns

bool

operator !=(FrameSample, FrameSample)

C#
public static bool operator !=(FrameSample left, FrameSample right)

Parameters

left FrameSample

right FrameSample

Returns

bool