]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/semaphore.cpp
Drop copyright and license notices from source files
[libs/core.git] / source / core / semaphore.cpp
index 544fb27f81b192731f4175b97257f7b6e534268c..e923ca8835efb7e3e7b59e4afd2f6ec4e92c078e 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of libmspcore
-Copyright © 2006  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifdef WIN32
 #include <windows.h>
 #else
@@ -92,11 +85,7 @@ bool Semaphore::wait(const Time::TimeDelta &d)
                throw system_error("Semaphore::wait");
        return ret==WAIT_OBJECT_0;
 #else
-       Time::TimeStamp ts = Time::now()+d;
-
-       timespec timeout;
-       timeout.tv_sec = ts.raw()/1000000;
-       timeout.tv_nsec = (ts.raw()%1000000)*1000;
+       timespec timeout = Time::now()+d;
 
        int err = pthread_cond_timedwait(&priv->cond, &priv->mutex.priv->mutex, &timeout);
        if(err && err!=ETIMEDOUT)