Implementation of time.Sleep()

I was wondering how time.Sleep() is implemented in the standard library. There is no implementation?! - its just the function definition without the function body. What am I missing?

time.Sleep() is actually implemented in the runtime. You can find the implementation here: You see can that it is linking the time.Sleep() call to the timeSleep() func with the //go:linkname directive.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.