Re: [Windows,PATCH] Use faster, higher precision timer API

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: [Windows,PATCH] Use faster, higher precision timer API
Дата
Msg-id 541A5371.3030509@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [Windows,PATCH] Use faster, higher precision timer API  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
On 09/17/2014 11:19 PM, Andrew Dunstan wrote:
> 
> On 09/17/2014 08:27 AM, Craig Ringer wrote:
>> Hi all
>> On Windows 2012 and Windows 8 I'd like to use the new
>> GetSystemTimePreciseAsFileTime call instead. As this requires some extra
>> hoop-jumping to safely and efficiently use it without breaking support
>> for older platforms I suggest that we start with just switching over to
>> GetSystemTimeAsFileTime, which has been supported since Windows 2000.
>> Then more precise time capture can be added in a later patch.

> That will presumably breaK XP.

Yes, and Windows 7. But this patch doesn't to that, it just makes
adjustments that make it easier.

The next step is to use LoadLibrary and GetProcAddress to resolve
GetSystemTimePreciseAsFileTime *if it is available*, during backend
start. Then use it if possible, and fall back to GetSystemTimeAsFileTime
if it isn't.

This patch does not introduce any BC changes. At all. I should've
omitted all mention of the next step I want to take, but I thought it
was a useful explanation of why this change makes a bigger improvement
easier.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jan Wieck
Дата:
Сообщение: Re: proposal: plpgsql - Assert statement
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: [Windows,PATCH] Use faster, higher precision timer API