This is the mail archive of the cygwin-developers 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]

timeBeginPeriod considered harmful


In times.cc we (I?) call the timeBeginPeriod with the minimal setting allowed
for the system.  While this generally allows 1 millisecond resolution, it also
seems to imply that the system is now being interrupted much more often.  I
am beginning to think that this is not a good thing, especially after reading
the following blog:

http://blogs.msdn.com/larryosterman/archive/2005/09/08/462477.aspx

I'm thinking of going back to using tick resolution in cygwin where a
tick is several milliseconds.  This may cause problems for people who
have gotten used to millisecond resolution but I think it may solve some
of the problems we've seen with people who claim that cygwin is eating
all of their CPU and it possibly could fix the strange problem of the
hanging open office builds.

I was thinking of implementing a (clutch chest, gasp!) non-POSIX
clock_setres() (or maybe a cygwin_clock_setres) function to allow people
to set the resolution to a millisecond if that is really what they want.
Otherwise, it seems like functions which query the time at < 1 second
resolution are well within their rights if they return dates based on
some arbitrary system resolution.

Does anyone have any experience with the timer functions?  Pierre are
you still out there?  I think you had some experience with this.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]