Re: does usleep() sleep more than it's supposed to?

2007-02-26 Thread Jason Thurston
I believe it is only guaranteed to sleep for at least the number of microseconds specified. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ:

Re: does usleep() sleep more than it's supposed to?

2007-02-26 Thread Corinna Vinschen
On Feb 26 15:57, Carlo Florendo wrote: I'm writing an application that requires time precisions up to the microsecond level. Though I love the idea to use Cygwin for everything, including stuff like simulating the universe bit-accurate in realtime, it might be a teeny bit daring to expect

Re: does usleep() sleep more than it's supposed to?

2007-02-26 Thread Lev Bishop
On 2/26/07, Carlo Florendo wrote: I'm writing an application that requires time precisions up to the microsecond level. However, I put a hard-coded adjustment of 9000 microseconds since usleep() seems to sleep on the average of 9000 microseconds more than it's supposed to, at least on my

Re: does usleep() sleep more than it's supposed to?

2007-02-26 Thread Brian Ford
On Mon, 26 Feb 2007, Carlo Florendo wrote: I'm writing an application that requires time precisions up to the microsecond level. Then you shouldn't be using Windows. Millisecond resolution is all the scheduler can do (this varies slightly depending on the platform). However, I put a

Re: does usleep() sleep more than it's supposed to?

2007-02-26 Thread Christopher Layne
On Mon, Feb 26, 2007 at 03:57:10PM +0800, Carlo Florendo wrote: Good Day, I'm writing an application that requires time precisions up to the microsecond level. However, I put a hard-coded adjustment of 9000 microseconds since usleep() seems to sleep on the average of 9000 microseconds more

Re: does usleep() sleep more than it's supposed to?

2007-02-26 Thread Carlo Florendo
Corinna Vinschen wrote: On Feb 26 15:57, Carlo Florendo wrote: I'm writing an application that requires time precisions up to the microsecond level. Though I love the idea to use Cygwin for everything, including stuff like simulating the universe bit-accurate in realtime, it might be a teeny

Re: does usleep() sleep more than it's supposed to?

2007-02-26 Thread Carlo Florendo
Lev Bishop wrote: On 2/26/07, Carlo Florendo wrote: I'm writing an application that requires time precisions up to the microsecond level. However, I put a hard-coded adjustment of 9000 microseconds since usleep() seems to sleep on the average of 9000 microseconds more than it's supposed to,

[SOLVED] Re: does usleep() sleep more than it's supposed to?

2007-02-26 Thread Carlo Florendo
Brian Ford wrote: Put this in its own (separate from all Cygwin code) object file, call it before any timing calls in your application, and link it with -lwinmm: #include windows.h void SetSchedulerMaxRes(void) { TIMECAPS tc; /* Set the system scheduler resolution to its maximum.

Re: does usleep() sleep more than it's supposed to?

2007-02-26 Thread Carlo Florendo
Brian Ford wrote: On Mon, 26 Feb 2007, Carlo Florendo wrote: I'm writing an application that requires time precisions up to the microsecond level. Then you shouldn't be using Windows. Millisecond resolution is all the scheduler can do (this varies slightly depending on the platform).

does usleep() sleep more than it's supposed to?

2007-02-25 Thread Carlo Florendo
Good Day, I'm writing an application that requires time precisions up to the microsecond level. However, I put a hard-coded adjustment of 9000 microseconds since usleep() seems to sleep on the average of 9000 microseconds more than it's supposed to, at least on my system. I could work with up