Timing: Some style changes

This commit is contained in:
jduncanator 2018-10-25 10:21:02 +11:00
commit 9340c72084

View file

@ -4,15 +4,6 @@ namespace Ryujinx.Common
{ {
public static class PerformanceCounter public static class PerformanceCounter
{ {
static PerformanceCounter()
{
TicksPerMillisecond = Stopwatch.Frequency / 1000;
TicksPerSecond = Stopwatch.Frequency;
TicksPerMinute = TicksPerSecond * 60;
TicksPerHour = TicksPerMinute * 60;
TicksPerDay = TicksPerHour * 24;
}
/// <summary> /// <summary>
/// Represents the number of ticks in 1 day. /// Represents the number of ticks in 1 day.
/// </summary> /// </summary>
@ -45,9 +36,7 @@ namespace Ryujinx.Common
{ {
get get
{ {
long timestamp = Stopwatch.GetTimestamp(); return Stopwatch.GetTimestamp();
return timestamp;
} }
} }
@ -63,5 +52,14 @@ namespace Ryujinx.Common
return timestamp / TicksPerMillisecond; return timestamp / TicksPerMillisecond;
} }
} }
static PerformanceCounter()
{
TicksPerMillisecond = Stopwatch.Frequency / 1000;
TicksPerSecond = Stopwatch.Frequency;
TicksPerMinute = TicksPerSecond * 60;
TicksPerHour = TicksPerMinute * 60;
TicksPerDay = TicksPerHour * 24;
}
} }
} }