Beispiel #1
0
// parallelSleep returns the absolute difference between the start time
// of the two sleeps.
func parallelSleep(n int) int64 {
	t := int64(C.twoSleep(C.int(n))) - <-sleepDone
	if t < 0 {
		return -t
	}
	return t
}
Beispiel #2
0
func parallelSleep(n int) {
	C.twoSleep(C.int(n))
	<-sleepDone
}