diff --git a/Audio/Utils/Semaphore.h b/Audio/Utils/Semaphore.h index 39f98d16a..6aaece9f7 100644 --- a/Audio/Utils/Semaphore.h +++ b/Audio/Utils/Semaphore.h @@ -15,7 +15,7 @@ -(id)init; -(void)signal; --(void)timedWait:(int)seconds; +-(void)timedWait:(int)microseconds; -(void)wait; -(void)waitIndefinitely; diff --git a/Audio/Utils/Semaphore.m b/Audio/Utils/Semaphore.m index 620ff50da..af13e9d7e 100644 --- a/Audio/Utils/Semaphore.m +++ b/Audio/Utils/Semaphore.m @@ -27,9 +27,9 @@ semaphore_signal_all(semaphore); } --(void)timedWait:(int)seconds +-(void)timedWait:(int)microseconds { - mach_timespec_t timeout = {seconds, 0}; + mach_timespec_t timeout = {0, microseconds * 1000UL}; semaphore_timedwait(semaphore, timeout); }