Fixed compilation error on Windows Phone 7 and Xbox 360 builds
git-svn-id: file:///srv/devel/repo-conversion/nusu@212 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
46cbc920b1
commit
eafb9e442b
|
@ -92,8 +92,11 @@ namespace Nuclex.Support.Scheduling {
|
||||||
// Force a timeout at least each second so the caller can check the system time
|
// Force a timeout at least each second so the caller can check the system time
|
||||||
// since we're not able to provide the DateTimeAdjusted notification
|
// since we're not able to provide the DateTimeAdjusted notification
|
||||||
int milliseconds = (int)(ticks / TicksPerMillisecond);
|
int milliseconds = (int)(ticks / TicksPerMillisecond);
|
||||||
|
#if WINDOWS
|
||||||
bool signalled = waitHandle.WaitOne(Math.Min(1000, milliseconds), false);
|
bool signalled = waitHandle.WaitOne(Math.Min(1000, milliseconds), false);
|
||||||
|
#else
|
||||||
|
bool signalled = waitHandle.WaitOne(Math.Min(1000, milliseconds));
|
||||||
|
#endif
|
||||||
// See whether the system date/time have been adjusted while we were asleep.
|
// See whether the system date/time have been adjusted while we were asleep.
|
||||||
checkForTimeAdjustment();
|
checkForTimeAdjustment();
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,11 @@ namespace Nuclex.Support.Scheduling {
|
||||||
/// True if the WaitHandle was signalled, false if the timeout was reached
|
/// True if the WaitHandle was signalled, false if the timeout was reached
|
||||||
/// </returns>
|
/// </returns>
|
||||||
public override bool WaitOne(AutoResetEvent waitHandle, long ticks) {
|
public override bool WaitOne(AutoResetEvent waitHandle, long ticks) {
|
||||||
|
#if WINDOWS
|
||||||
return waitHandle.WaitOne((int)(ticks / TicksPerMillisecond), false);
|
return waitHandle.WaitOne((int)(ticks / TicksPerMillisecond), false);
|
||||||
|
#else
|
||||||
|
return waitHandle.WaitOne((int)(ticks / TicksPerMillisecond));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -164,7 +164,11 @@ namespace Nuclex.Support.Tracking {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if WINDOWS
|
||||||
return WaitHandle.WaitOne(timeoutMilliseconds, false);
|
return WaitHandle.WaitOne(timeoutMilliseconds, false);
|
||||||
|
#else
|
||||||
|
return WaitHandle.WaitOne(timeoutMilliseconds);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Whether the transaction has ended already</summary>
|
/// <summary>Whether the transaction has ended already</summary>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user