added PerformanceCounter

This commit is contained in:
Evil Factory
2022-06-19 11:50:51 -03:00
parent 78716f4695
commit 64c81146fb
5 changed files with 61 additions and 16 deletions
@@ -6,20 +6,8 @@ namespace Barotrauma
{
public class LuaCsTimer
{
public static long LastUpdateTime = 0;
public static double Time => Timing.TotalTime;
public static double GetTime() => Time;
public static float GetUsageMemory()
{
Process proc = Process.GetCurrentProcess();
float memory = MathF.Round(proc.PrivateMemorySize64 / (1024 * 1024), 2);
proc.Dispose();
return memory;
}
private class TimerComparer : IComparer<TimedAction>
{