@@ -166,11 +166,11 @@ #ifndef _WIN32 if (seconds > UINT_MAX) @throw [OFOutOfRangeException newWithClass: self]; sleep((unsigned int)seconds); - usleep((uint32_t)nearbyint(remainder(seconds, 1) * 1000000)); + usleep((useconds_t)fmod(seconds * 1000000, 1000000)); #else if (seconds * 1000 > UINT_MAX) @throw [OFOutOfRangeException newWithClass: self]; Sleep((unsigned int)(seconds * 1000)); @@ -184,11 +184,11 @@ #ifndef _WIN32 if (seconds > UINT_MAX) @throw [OFOutOfRangeException newWithClass: self]; sleep((unsigned int)seconds); - usleep((uint32_t)nearbyint(remainder(seconds, 1) * 1000000)); + usleep((useconds_t)fmod(seconds * 1000000, 1000000)); #else if (seconds * 1000 > UINT_MAX) @throw [OFOutOfRangeException newWithClass: self]; Sleep((unsigned int)(seconds * 1000));