From 3452f1309cff8564b85cd87d76ab7ceaea50ed8d Mon Sep 17 00:00:00 2001 From: thebeing Date: Tue, 5 Nov 2013 10:15:00 +0000 Subject: [PATCH] Fix calculation of the timeout for a cooperating get or put (it was multiplied by 1000 where it should have been divided by 1000) git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/performance/trunk@37362 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ GSFIFO.m | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 28cc9ac..b9f4f8b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-11-05 Niels Grewe + + * GSFIFO.m: Fix calculation of the timeout for cooperating + get/put. + 2013-08-21 Richard Frith-Macdonald * GSFIFO.m: 64bit printf format changes diff --git a/GSFIFO.m b/GSFIFO.m index f01e72d..5a1bb8c 100644 --- a/GSFIFO.m +++ b/GSFIFO.m @@ -155,7 +155,7 @@ stats(NSTimeInterval ti, uint32_t max, NSTimeInterval *bounds, uint64_t *bands) NSDate *d; d = [[NSDateClass alloc] - initWithTimeIntervalSinceNow: 1000.0 * timeout]; + initWithTimeIntervalSinceNow: timeout / 1000.0f]; while (_head - _tail == 0) { if (NO == [condition waitUntilDate: d]) @@ -231,7 +231,7 @@ stats(NSTimeInterval ti, uint32_t max, NSTimeInterval *bounds, uint64_t *bands) NSDate *d; d = [[NSDateClass alloc] - initWithTimeIntervalSinceNow: 1000.0 * timeout]; + initWithTimeIntervalSinceNow: timeout / 1000.0f]; while (_head - _tail == _capacity) { if (NO == [condition waitUntilDate: d])