What is the WinRT replacement for System.Environment.TickCount?
It should be available, because it isn't a problem. But it is not, a [TypeForwardedTo] hangup I guess because GetTickCount() isn't on the white list and .NET never adopted GetTickCount64. The standard fallback works fine, you can use pinvoke the call the native Windows function. I verified that a program that uses it passes the Windows App Certification Kit test.
[System.Runtime.InteropServices.DllImport("kernel32.dll")]
private static extern long GetTickCount64();
Note that it returns a long, not an int. You can simply cast to int to truncate if that's important in C# (but not vb.net, just lie about the return type)
It appears System.Environment.TickCount is supported in Windows 8 Windows store apps now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With