Cosmos/source/Cosmos.Core_Plugs/System/Diagnostics/StopwatchImpl.cs
Valentin Charbonnier 8bf2a495a9 Fix.
2018-03-26 22:38:07 +02:00

23 lines
793 B
C#

using IL2CPU.API.Attribs;
using System;
using System.Diagnostics;
using Cosmos.Core.PCInformation;
namespace Cosmos.Core_Plugs.System.Diagnostics
{
[Plug(Target = typeof(global::System.Diagnostics.Stopwatch))]
public class StopwatchImpl
{
public static long GetTimestamp()
{
/*
if (Stopwatch.IsHighResolution)
// see https://msdn.microsoft.com/en-us/library/windows/desktop/dn553408(v=vs.85).aspx for more details
return (long)(ProcessorInformation.GetCycleCount() / (double)ProcessorInformation.GetCycleRate() * 1000000d);
else
return DateTime.UtcNow.Ticks;
*/
throw new NotImplementedException("Not implemented. Well, sort of...");
}
}
}