@@ -0,0 +1,21 @@
+package timer_test
+
+import (
+ "fmt"
+ "testing"
+ "time"
+)
+func TestTimer(t *testing.T) {
+ ch := make(chan interface{}, 1)
+ ch <- time.Now()
+ for {
+ select {
+ case <-ch:
+ fmt.Println(time.Now())
+ time.AfterFunc(1*time.Second, func() {
+ })
+ }
+}