From: SourceForge.net <no...@so...> - 2009-06-26 22:43:32
|
Patches item #2813052, was opened at 2009-06-26 17:43 Message generated for change (Tracker Item Submitted) made by jll544 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=302435&aid=2813052&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: runtime Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jeff Lu (jll544) Assigned to: Nobody/Anonymous (nobody) Summary: Fix usleep interval rounding Initial Comment: MinGW usleep(useconds) calls Sleep(useconds/1000). When useconds < 1000, the resulting Sleep(0) can return almost immediately. This behavior can result in excessive CPU usage when usleep is used inside a loop. According to standards, the correct behavior is to round up the sleep interval when necessary. http://www.opengroup.org/onlinepubs/000095399/functions/usleep.html 2009-06-26 Jeff Lu <jll544 at yahoo.com> * mingwex/usleep.c: round up to next ms ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=302435&aid=2813052&group_id=2435 |