time: use Duration for AfterFunc.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5465043
diff --git a/src/pkg/time/sleep.go b/src/pkg/time/sleep.go
index 1e23118..844d964 100644
--- a/src/pkg/time/sleep.go
+++ b/src/pkg/time/sleep.go
@@ -72,13 +72,13 @@
 	return NewTimer(d).C
 }
 
-// AfterFunc waits at least ns nanoseconds before calling f
+// AfterFunc waits for the duration to elapse and then calls f
 // in its own goroutine. It returns a Timer that can
 // be used to cancel the call using its Stop method.
-func AfterFunc(ns int64, f func()) *Timer {
+func AfterFunc(d Duration, f func()) *Timer {
 	t := &Timer{
 		r: runtimeTimer{
-			when: nano() + ns,
+			when: nano() + int64(d),
 			f:    goFunc,
 			arg:  f,
 		},