Struct MasterTimeState
JSON-safe snapshot of the entire ScyllaTime service: global pause,
pause mode, base time scale, global modifier stack, and a snapshot of every
registered clock with PersistOnSnapshot
set to true.
Inherited Members
Namespace: Scylla.Core.Time
Assembly: ScyllaCore.dll
Syntax
[Serializable]
public struct MasterTimeState
Remarks
The struct is intentionally flat - every field maps to a JSON-safe primitive or array of primitives. Round-trip via ScyllaSerialization preserves every numeric field exactly; Action callbacks (scheduler / WaitUntil watchers) are NOT captured because they cannot be serialized portably.
Fields
CURRENT_SCHEMA_VERSION
Schema version written by CaptureState() and validated by RestoreState(MasterTimeState). Bump on incompatible field changes so old snapshots are rejected with a clear warning instead of silently deserializing into default values.
Declaration
public const int CURRENT_SCHEMA_VERSION = 1
Field Value
| Type | Description |
|---|---|
| int |
Clocks
Snapshot of every registered clock with PersistOnSnapshot = true.
Declaration
public ClockState[] Clocks
Field Value
| Type | Description |
|---|---|
| ClockState[] |
GlobalBaseTimeScale
Global base time scale (the value returned by TimeScale).
Declaration
public float GlobalBaseTimeScale
Field Value
| Type | Description |
|---|---|
| float |
GlobalModifiers
Snapshots of the global modifier stack.
Declaration
public TimeScaleModifierState[] GlobalModifiers
Field Value
| Type | Description |
|---|---|
| TimeScaleModifierState[] |
GlobalPauseMode
Global pause mode at capture time.
Declaration
public PauseMode GlobalPauseMode
Field Value
| Type | Description |
|---|---|
| PauseMode |
GlobalPrePauseTimeScale
Pre-pause time scale captured at the moment Pause() was called, so that Resume() can restore it exactly. Round-tripped so a paused snapshot resumes to the correct value across save/load boundaries.
Declaration
public float GlobalPrePauseTimeScale
Field Value
| Type | Description |
|---|---|
| float |
IsGlobalPaused
Global pause flag.
Declaration
public bool IsGlobalPaused
Field Value
| Type | Description |
|---|---|
| bool |
SchemaVersion
Schema version. Set to 1 for the initial release; bump on incompatible changes.
Declaration
public int SchemaVersion
Field Value
| Type | Description |
|---|---|
| int |