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:
Markus Ewald 2010-12-24 01:32:14 +00:00
parent 46cbc920b1
commit eafb9e442b
3 changed files with 12 additions and 1 deletions

View File

@ -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();

View File

@ -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>

View File

@ -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>