Hi all,
I encountered an issue where, on OS x with Go 1.6, time.Sleep(10) was called, then the system clock was set backwards by 7 years, and the Sleep never returned (well, it's only been a few days -- I imagine it will return in about 6 years and 358 days). I found this post from a few years ago that indicates the problem is likely that Go doesn't support monotonic timers on OS X:
https://groups.google.com/d/msg/golang-dev/gVFa7DC8UI0/3gfW_2bV1U4J.
My questions are:
1) Is that indeed still the case with Go 1.6?
2) Are there any common patterns people use to get around this? I guess I can have some logic that tries to detect whether the clock went backward, and if so, somehow interrupt all existing timers. Or maybe I can write my own sleep method using cgo? Any other ideas?
Thanks,
Jeremy