mono tickcount fix

This commit is contained in:
Mark Sturgill 2013-10-30 11:49:59 -07:00
parent fc923a9ded
commit 018ef960b0

View file

@ -132,11 +132,12 @@ namespace Server
public static long TickCount { public static long TickCount {
get { get {
long t = 0; long t = 0;
#if !MONO
// TODO: Unreliable with certain system configurations. // TODO: Unreliable with certain system configurations.
if (_HighRes) if (_HighRes)
SafeNativeMethods.QueryPerformanceCounter(out t); SafeNativeMethods.QueryPerformanceCounter(out t);
else else
#endif
t = DateTime.UtcNow.Ticks; t = DateTime.UtcNow.Ticks;
return (long)((double)t * _Frequency); return (long)((double)t * _Frequency);