From: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
---|---|
To: | Peter Geoghegan <pg(at)heroku(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Greg Stark <stark(at)mit(dot)edu>, John R Pierce <pierce(at)hogranch(dot)com>, PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: log_checkpoints, microseconds |
Date: | 2014-04-10 20:00:46 |
Message-ID: | 5346F86E.7040406@vmware.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On 04/10/2014 10:43 PM, Peter Geoghegan wrote:
> On Thu, Apr 10, 2014 at 12:20 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I think you're both wrong. 1000 usec = 1 msec, not the other way round.
>
> Yes, but why would you ever want to divide any number of microseconds
> by 1000 like this, unless you were actually interested in nanoseconds?
> The point is that we start out with microseconds "elapsed" here, not
> milliseconds or seconds.
Take a break, then take another look.
The code first gets the number of microseconds elapsed. It wants to
print it out in milliseconds. The question is: "How many milliseconds is
X microseconds"? The answer is X / 1000.
For comparison, imagine that you know that 180 minutes has elapsed, and
you want to print that out in hours. To do that, you divide 180 by 60.
- Heikki
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2014-04-10 20:03:57 | Re: log_checkpoints, microseconds |
Previous Message | Greg Stark | 2014-04-10 19:59:45 | Re: log_checkpoints, microseconds |