--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
For the record, CLOCK_MONOTONIC is not necessarily monotonic :).
On Tue, Aug 20, 2013 at 8:41 PM, Kyle Lemons <kev...@google.com> wrote:No, I want wall-clock time. It's a same that linux does not have it.
> Are you thinking of clock? I believe that is only useful for measuring
> "short" spans of time on a single thread, and I believe it only counts the
> amount of time your binary is actually executing, not wall-clock time.
One wants it in lots of cases -- everything related to measuring or
specifying relative periods.
On Tue, Aug 20, 2013 at 8:57 PM, Kyle Lemons <kev...@google.com> wrote:GetTickCount64 never step back, never adjusted, global for all processors.
> On Tue, Aug 20, 2013 at 9:49 AM, Dmitry Vyukov <dvy...@google.com> wrote:
>>
>> On Tue, Aug 20, 2013 at 8:41 PM, Kyle Lemons <kev...@google.com> wrote:
>> > Are you thinking of clock? I believe that is only useful for measuring
>> > "short" spans of time on a single thread, and I believe it only counts
>> > the
>> > amount of time your binary is actually executing, not wall-clock time.
>>
>> No, I want wall-clock time. It's a same that linux does not have it.
>> One wants it in lots of cases -- everything related to measuring or
>> specifying relative periods.
>
>
> It's not clear to me that windows has what you describe either. As I said,
> it's a very difficult problem. My day-job is Time, and I'm still learning
> gotchas. It's not really clear to me that the windows version is actually
> any better either.
The potential gotcha is that includes time in hibernation,
QueryUnbiasedInterruptTime() returns time excluding hibernation.
I agree if the absolute time is a monotonic time. My example about the socket timeout was this, where the absolute time is real time. Adjusting the clock on the host will affect the timeout. If one does not use NTP synced machines this may be a time bomb waiting to go off.
I hope I have not misunderstood anything about how to use this API, I believe that time.Time is a real time clock (basically unix epoque time).
I'm a big proponent of monotonic time, want to use it as much as possible.
On Wed, Sep 18, 2013 at 1:59 PM, Kyle Lemons <kev...@google.com> wrote:Why?
> The problem is that you can't make net and such use a monotonic clock.