X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Fsemaphore.cpp;h=8fa1be90f7c7e234abde3e74409bfb916acbffb9;hp=b7151e34af517af94bffb7e04b73c64d2315bb14;hb=03bacb2343eb5d17819732582c0866f087e9ce27;hpb=6728e37df7f74130689d3829a1466422451735e3 diff --git a/source/core/semaphore.cpp b/source/core/semaphore.cpp index b7151e3..8fa1be9 100644 --- a/source/core/semaphore.cpp +++ b/source/core/semaphore.cpp @@ -1,16 +1,10 @@ -/* $Id$ - -This file is part of libmspcore -Copyright © 2006 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifdef WIN32 #include #else #include #include #endif +#include #include #include #include @@ -92,7 +86,7 @@ bool Semaphore::wait(const Time::TimeDelta &d) throw system_error("Semaphore::wait"); return ret==WAIT_OBJECT_0; #else - timespec timeout = Time::now()+d; + timespec timeout = Time::rawtime_to_timespec((Time::now()+d).raw()); int err = pthread_cond_timedwait(&priv->cond, &priv->mutex.priv->mutex, &timeout); if(err && err!=ETIMEDOUT)