@@ -13,12 +13,10 @@ * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ -#include - bool of_condition_new(of_condition_t *condition) { return (pthread_cond_init(condition, NULL) == 0); } @@ -46,15 +44,15 @@ of_time_interval_t timeout) { struct timespec ts; ts.tv_sec = (time_t)timeout; - ts.tv_nsec = lrint((timeout - ts.tv_sec) * 1000000000); + ts.tv_nsec = (timeout - ts.tv_sec) * 1000000000; return (pthread_cond_timedwait(condition, mutex, &ts) == 0); } bool of_condition_free(of_condition_t *condition) { return (pthread_cond_destroy(condition) == 0); }