2
0
mirror of https://github.com/boostorg/thread.git synced 2026-01-28 19:52:10 +00:00

Merged from RC_1_28_0 branch

[SVN r13905]
This commit is contained in:
William E. Kempf
2002-05-15 14:35:39 +00:00
parent 7ba4fc4aed
commit a80d5f159d
6 changed files with 28 additions and 28 deletions

View File

@@ -192,13 +192,13 @@ void thread::join()
void thread::sleep(const xtime& xt)
{
#if defined(BOOST_HAS_WINTHREADS)
unsigned milliseconds;
int milliseconds;
to_duration(xt, milliseconds);
Sleep(milliseconds);
#elif defined(BOOST_HAS_PTHREADS)
# if defined(BOOST_HAS_PTHREAD_DELAY_NP)
timespec ts;
to_timespec(xt, ts);
to_timespec_duration(xt, ts);
int res = 0;
res = pthread_delay_np(&ts);
assert(res == 0);
@@ -216,7 +216,7 @@ void thread::sleep(const xtime& xt)
cond.timed_wait(lock, xt);
# endif
#elif defined(BOOST_HAS_MPTASKS)
unsigned microseconds;
int microseconds;
to_microduration(xt, microseconds);
Duration lMicroseconds(kDurationMicrosecond * microseconds);
AbsoluteTime sWakeTime(DurationToAbsolute(lMicroseconds));