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]

Re: LoadLibrary error 487 (was Re: Please test latest developer snapshot)


Hmpf...

On Mar  2 12:07, Corinna Vinschen wrote:
> @@ -752,24 +773,33 @@ hires_ms::resolution ()
>  {
>    if (!minperiod)
>      {
> -      /* Try to empirically determine current timer resolution */
> -      int priority = GetThreadPriority (GetCurrentThread ());
> -      SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_TIME_CRITICAL);
> -      DWORD period = 0;
> -      for (int i = 0; i < 4; i++)
> +      NTSTATUS status;
> +      ULONG coarsest, finest, actual;
> +
> +      status = NtQueryTimerResolution (&coarsest, &finest, &actual);
> +      if (NT_SUCCESS (status))
> +	minperiod = (UINT) actual;

	minperiod = (UINT) actual / 10000L;


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


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