I was having time resolution issues for a long time! Until I found your
example of Clock() fast and easy implementation.

Thank you very much!
On Tuesday, 28 August 2012 20:37:41 UTC+2, Maxim Khitrov wrote:

On Tue, Aug 28, 2012 at 1:06 PM, minux <[email protected] <javascript:>>
On Wed, Aug 29, 2012 at 12:47 AM, Maxim Khitrov <[email protected]
<javascript:>> wrote:
I'm trying to time certain operations that cannot run within the
testing.Benchmark framework. It seems that unless the operation takes
at least 1 ms, the difference between two time.Now() calls is zero.
What is the source of timing information on Windows? I found the
implementations of runtime.now() for other platforms, but no idea what
Windows is using.
time.Now is implemented in
using GetSystemTimeAsFileTime

Is there any way to access QueryPerformanceCounter and
QueryPerformanceFrequency functions? From some searching it looks like
these used to be available in the runtime package, but have since been
you can roll your own by using the syscall pkg.
Not even a hint? :)

Here's a working example for anyone else interested (won't run on the
play server, obviously): http://play.golang.org/p/Q2BbWz0sU1

- Max
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
postedJul 31, '15 at 7:22p
activeJul 31, '15 at 7:22p

1 user in discussion

Marcel Farrés Franch: 1 post



site design / logo © 2023 Grokbase