• Keith Randall's avatar
    runtime: use libc for nanotime on Darwin · cc09212f
    Keith Randall authored
    Use mach_absolute_time and mach_timebase_info to get nanosecond-level
    timing information from libc on Darwin.
    
    The conversion code from Apple's arbitrary time unit to nanoseconds is
    really annoying.  It would be nice if we could replace the internal
    runtime "time" with arbitrary units and put the conversion to nanoseconds
    only in the places that really need it (so it isn't in every nanotime call).
    
    It's especially annoying because numer==denom==1 for all the machines
    I tried.  Makes it hard to test the conversion code :(
    
    Update #17490
    
    Change-Id: I6c5d602a802f5c24e35184e33d5e8194aa7afa86
    Reviewed-on: https://go-review.googlesource.com/110655
    Run-TryBot: Keith Randall <khr@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    cc09212f
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...