Syntriax.Engine/Engine.Core/Time.cs

16 lines
426 B
C#
Raw Normal View History

2024-01-22 23:23:32 +03:00
using System;
namespace Syntriax.Engine.Core;
public static class Time
{
2024-01-23 12:04:32 +03:00
private static EngineTime _engineTime = new(TimeSpan.Zero, TimeSpan.Zero);
2024-01-22 23:23:32 +03:00
2024-01-23 12:04:32 +03:00
public static TimeSpan Total => _engineTime.Total;
public static TimeSpan Elapsed => _engineTime.Elapsed;
2024-01-22 23:23:32 +03:00
2024-02-01 18:43:33 +03:00
public static float DeltaTimeFrame => _engineTime.DeltaTimeFrame;
2024-01-23 12:04:32 +03:00
public static void SetTime(EngineTime engineTime) => _engineTime = engineTime;
2024-01-22 23:23:32 +03:00
}