This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This patch to nanosleep, sleep and usleep a) makes them Posix conformant: the system clock (gettimeofday) must advance by at least d during Xsleep(d) (e.g. exim relies on this to create unique ids). b) improves the resolution of the result by using the multimedia timer. c) calls timeBeginPeriod in forked processes. A follow up patch will improve setitimer. Pierre 2003-09-03 Pierre Humblet <pierre.humblet@ieee.org> * hires.h (_DELAY_MAX): Define. (hires_ms::minperiod): Declare static. (hires_ms::resolution): New. (hires_ms::dmsecs): New. (hires_ms::~hires_ms): Delete. (gtod): Declare. * time.c (hires_ms::prime): Always calculate minperiod and set it to 1 in case of failure. (hires_ms::resolution): Define. (hires_ms::~hires_ms): Delete. (hires_ms::usecs): Check minperiod to prime. (gtod) Define. * signal.cc (nanosleep): Round delay up to resolution. Fix test for negative remainder. Use timeGetTime through gtod. (sleep): Round up return value.
Attachment:
sleep.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |