This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: LoadLibrary error 487 (was Re: Please test latest developer snapshot)
On Mar 1 21:42, Corinna Vinschen wrote:
> On Mar 1 18:53, Corinna Vinschen wrote:
> > My brain is a bit fuzzy in terms of remembering this stuff. Did we ever
> > discussed to use a waitable timer? This only requires ntdll functions.
> > I think this is how winmm implements timeGetTime.
>
> Or we implement timeGetTime ourselves. Since we don't need the actual
> value (msecs since system startup), we can simply use the core code of
> the function. In C it would look like this:
>
> DWORD
> timeGetTime_coreloop ()
> {
> LARGE_INTEGER t;
>
> do
> {
> t.HighPart = SharedUserData.InterruptTime.High1Time;
> t.LowPart = SharedUserData.InterruptTime.LowPart;
> }
> while (t.HighPart != SharedUserData.InterruptTime.High2Time);
> t.QuadPart /= 10000;
> return t.LowPart;
> }
>
> The rest of the (very short) timeGetTime function just subtracts and
> adds some constant values to t before returning its LowPart.
...which obviously also means that timeGetTime() is not implemented
using a waitable timer.
> timeEndPeriod and timeBeginPeriod could be replaced with calls to
> NtSetTimerResolution.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat