Skip to content

KernelAPI reference

Class TimeSettings

Namespace: MicroEngine.Kernel
Assembly: MicroEngine.Kernel.dll
Guide: Modules and the frame schedule

The loop’s time policy: the fixed simulation rate, how far a slow frame may catch up, and whether time follows the wall clock. Every value is explicit; nothing is derived from the platform or from other options.

C#
public sealed record TimeSettings : IEquatable<TimeSettings>

Inheritance

object ← TimeSettings

Implements

IEquatable<TimeSettings>

Constructors

TimeSettings()

C#
public TimeSettings()

Properties

FixedDelta

Seconds of one fixed step: 1 / FixedRate.

C#
public double FixedDelta { get; }

Property Value

double

FixedRate

Fixed steps per second the simulation runs at (60 by default); must be positive.

C#
public int FixedRate { get; init; }

Property Value

int

MaxFrameDelta

The longest time in seconds one real-time frame may stand for (0.25 by default); must be positive. Longer frames (the window was dragged, a breakpoint) count as this much, so the game does not jump ahead.

C#
public double MaxFrameDelta { get; init; }

Property Value

double

MaxStepsPerFrame

At most this many fixed steps run in one frame (5 by default); must be positive. A frame that would need more (a slow machine, a hitch) runs these and keeps at most one step of time pending, so the game slows down instead of falling further behind.

C#
public int MaxStepsPerFrame { get; init; }

Property Value

int

Mode

Whether time follows the wall clock or advances one fixed step per frame (RealTime by default).

C#
public TimeMode Mode { get; init; }

Property Value

TimeMode

Methods

<Clone>$()

C#
public TimeSettings <Clone>$()

Returns

TimeSettings

Equals(object?)

C#
public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(TimeSettings?)

C#
public bool Equals(TimeSettings? other)

Parameters

other TimeSettings?

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Validate()

Checks every value.

C#
public void Validate()

Exceptions

ArgumentOutOfRangeException

A value is out of range; the message names it.

Operators

operator ==(TimeSettings?, TimeSettings?)

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

Parameters

left TimeSettings?

right TimeSettings?

Returns

bool

operator !=(TimeSettings?, TimeSettings?)

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

Parameters

left TimeSettings?

right TimeSettings?

Returns

bool