func Wait(d time.Duration) {
	start := time.Now()
	// if duration is small (smaller than 1us) spin-wait
	if d.Microseconds() < 1 {
		if start.Add(d).After(time.Now()) {
			runtime.Gosched()
		}
	} else {
		time.Sleep(d)
	}
}
// Wait attempts to provide a higher precision sleep. It will sleep for larger
// periods, and spin-wait for periods under 1us.
Wait attempts to provide a higher precision sleep. It will sleep for larger
periods, and spin-wait for periods under 1us.
// Wait attempts to provide a higher precision sleep . It will sleep for larger // periods and spin - wait for periods under 1us .
func Wait(d time.Duration) {
	start := time.Now()
	if d.Microseconds() < 1 {
		if start.Add(d).After(time.Now()) {
			runtime.Gosched()
		}
	} else {
		time.Sleep(d)
	}
}
func Wait ( d time . Duration ) { start := time . Now ( ) if d . Microseconds ( ) < 1 { if start . Add ( d ) . After ( time . Now ( ) ) { runtime . Gosched ( ) } } else { time . Sleep ( d ) } }
Wait attempts to provide a higher precision sleep.
Wait attempts to provide a higher precision sleep .
// if duration is small (smaller than 1us) spin-wait