Hi.
I'd like to write function with spin-loop like this:
func readWait(timeout time.Duration) bool {
deadline := Nanotime() + timeout.Nanoseconds()
for {
if readAvail() {
return true
}
if Nanotime() >= deadline {
return false
}
runtime.Goshed()
}
}
But runtime.nanotime() is not exported. How can I do it without
time.After() or reimplementing runtime.nanotime()? Is there any package
implementing clock()/GetTickCount() functionality?
--
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.