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.
public sealed record TimeSettings : IEquatable<TimeSettings>Inheritance
Implements
Constructors
TimeSettings()
public TimeSettings()Properties
FixedDelta
Seconds of one fixed step: 1 / FixedRate.
public double FixedDelta { get; }Property Value
FixedRate
Fixed steps per second the simulation runs at (60 by default); must be positive.
public int FixedRate { get; init; }Property Value
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.
public double MaxFrameDelta { get; init; }Property Value
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.
public int MaxStepsPerFrame { get; init; }Property Value
Mode
Whether time follows the wall clock or advances one fixed step per frame (RealTime by default).
public TimeMode Mode { get; init; }Property Value
Methods
<Clone>$()
public TimeSettings <Clone>$()Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
obj object?
Returns
Equals(TimeSettings?)
public bool Equals(TimeSettings? other)Parameters
other TimeSettings?
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Validate()
Checks every value.
public void Validate()Exceptions
A value is out of range; the message names it.
Operators
operator ==(TimeSettings?, TimeSettings?)
public static bool operator ==(TimeSettings? left, TimeSettings? right)Parameters
left TimeSettings?
right TimeSettings?
Returns
operator !=(TimeSettings?, TimeSettings?)
public static bool operator !=(TimeSettings? left, TimeSettings? right)Parameters
left TimeSettings?
right TimeSettings?