Skip to main content

SpawningTimerNew

A class in Root.Township, the global namespace.

Disposable timer for spawning code: wrap work in a using and it logs name, message, milliseconds and start frame to the spawning logger. Used by SpawnManager and ChunkPrefabPointer.

Constructors​

MemberWhat it is
SpawningTimerNew(string message, string objectName = null)Creates a SpawningTimerNew from message and objectName.

Fields​

3 private and internal fields
MemberWhat it is
private int frameNumberFrame the timer started on.
private string messageWhat is being timed.
private Stopwatch stopwatchThe running stopwatch.

Properties​

MemberWhat it is
string ObjectName { get; set; }Name of the object being timed, written first in the log line.

Methods​

1 private and internal method
MemberWhat it is
private void System.IDisposable.Dispose()Stops the timer and writes a trace line to SpawningLogger.