Class MyGameTimer
Global thread-safe timer. Time for update and time for draw must be copied at the beginning of update and draw.
Inheritance
System.Object
MyGameTimer
Namespace: VRage.Library.Utils
Assembly: VRage.Library.dll
Syntax
public class MyGameTimer : Object
Constructors
MyGameTimer()
Declaration
public MyGameTimer()
Fields
Frequency
Number of ticks per seconds
Declaration
public static readonly long Frequency
Field Value
Type | Description |
---|---|
System.Int64 |
Properties
Elapsed
Declaration
public MyTimeSpan Elapsed { get; }
Property Value
Type | Description |
---|---|
MyTimeSpan |
ElapsedTicks
Declaration
public long ElapsedTicks { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
ElapsedTimeSpan
This may not be accurate for large values - double accuracy
Declaration
public TimeSpan ElapsedTimeSpan { get; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
Methods
AddElapsed(MyTimeSpan)
Declaration
public void AddElapsed(MyTimeSpan timespan)
Parameters
Type | Name | Description |
---|---|---|
MyTimeSpan | timespan |