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

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Marco Nenciarini <marco(dot)nenciarini(at)2ndquadrant(dot)it>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [Windows,PATCH] Use faster, higher precision timer API
Date: 2014-12-08 10:38:43
Message-ID: 54857FB3.20208@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/05/2014 08:03 PM, David Rowley wrote:
> On 2 December 2014 at 15:36, Craig Ringer <craig(at)2ndquadrant(dot)com
> <mailto:craig(at)2ndquadrant(dot)com>> wrote:
>
> On 12/01/2014 09:51 PM, Marco Nenciarini wrote:
> > I think this is a leftover, as you don't use elog afterwards.
>
> Good catch, fixed.
>
> I've looked over this again and tested it on a windows 8.1 machine. I
> cannot find any problems
>
> The only comments about the code I have would maybe be to use some
> constants like:
>
> #define FILETIME_PER_SEC10000000L
> #define FILETIME_PER_USEC10

[snip]

> I'll leave it up to the committer to decide if it's better with or
> without the attached patch.

I think it's more readable, and that's pretty much always a good thing.

Patches with your changes attached.

I used FILETIME_UNITS_PER_SEC though.

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

Attachment Content-Type Size
0001-Use-GetSystemTimeAsFileTime-directly-in-win32-gettim.patch text/x-patch 2.9 KB
0002-On-Windows-use-GetSystemTimePreciseAsFileTime-when-a.patch text/x-patch 4.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Anssi Kääriäinen 2014-12-08 10:43:54 Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Previous Message Thomas Reiss 2014-12-08 10:06:07 Casting issues with domains