Hi,
I found a project from github, that works in windows build but not on android.
After search the scripts finally find the cause. It seems that a script import kernel.dll that android dont support. I search about QueryPerformanceCounter and looks like a timer.
Is there something else that do the same job and i can replace it? I read for Stopwatch class but i dont understand how to use it in this case.
The script is huge (over 10000 lines), but i think i only need to change those parts. CurrentTime value is the important value because is used on almost all the script.
private static long QueryFrequency = -1L;
...
public static double CurrentTime
{
get
{
long lpPerformanceCount = 0L;
if (QueryFrequency < 0)
{
//QueryPerformanceFrequency(out QueryFrequency);
}
//QueryPerformanceCounter(out lpPerformanceCount);
return (double)lpPerformanceCount / (double)QueryFrequency;
}
}
...
[DllImport("Kernel32.dll")]
private static extern bool QueryPerformanceCounter(out long lpPerformanceCount);
[DllImport("Kernel32.dll")]
private static extern bool QueryPerformanceFrequency(out long lpFrequency);
Il be grateful if someone can answer my question with the fixed code, cause i am new to C# (mostly use visual scripting).