Managed to get this working The Go implementation now returns a monotonic time and works on 64 bit Intel Macs.
Updated version at https://gist.github.com/namsral/376d0f063f631593a52e3f5b439e289c#file-time_amd64-v2-s On Tuesday, January 17, 2017 at 4:36:27 AM UTC+1, la...@namsral.com wrote: > > I want to add monotonic time to Go's runtime on macOS (x86-64) by > replacing Go's runtime,nanotime() to macOS' mach_absolute_time(). > > So far my Go assembly compiles but it returns the seconds since 1970-01-01 > instead of what mach_absolute_time() returns. > > What I have so far: > > https://gist.github.com/namsral/376d0f063f631593a52e3f5b439e289c#file-time_amd64-s > > mach_absolute_time in x86-64 assembly: > > https://gist.github.com/namsral/376d0f063f631593a52e3f5b439e289c#file-mach_absolute_time-s > > mach_absolute_time used in C: > > https://gist.github.com/namsral/376d0f063f631593a52e3f5b439e289c#file-time-c > > -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.