MAME.Core/MAME.Unity/Assets/Script/UMAME/UniInterface/UniTimeSpan.cs
2025-01-16 11:14:23 +08:00

42 lines
833 B
C#

using MAME.Core;
public class UniTimeSpan : ITimeSpan
{
public ulong tick;
double tickDetailus = 16666.666667;
object tickLock = new object();
public void SetTick(ulong nexttick)
{
//lock (tickLock)
{
tick = nexttick;
}
}
//Õâ¸öº¯ÊýÎÞÒâÒå
public uint GetTickCount()
{
//lock (tickLock)
{
//return (uint)(tick * tickDetail);
return 0;
}
}
public bool QueryPerformanceCounter(ref long lpPerformanceCount)
{
lock (tickLock)
{
lpPerformanceCount = (long)tick;
return true;
}
}
public bool QueryPerformanceFrequency(ref long PerformanceFrequency)
{
PerformanceFrequency = (long)(1000000 / tickDetailus);
return true;
}
}