On branch timer
Changes to be committed: modified: main.go Add call to timer new file: timer/timer.go New 10 second timer
This commit is contained in:
1 parent
0ea14fd132
commit
a46c855960
2 files changed
+24
No files matched your search
@@ -0,0 +1,21 @@
|
||||
package timer
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
//"reflect"
|
||||
)
|
||||
|
||||
func New() {
|
||||
|
||||
timer_10s := time.NewTimer(10 * time.Second)
|
||||
// timer_1m := time.NewTimer(1 * time.Minute)
|
||||
fmt.Println("Waiting 10 seconds...")
|
||||
<-timer_10s.C
|
||||
|
||||
|
||||
|
||||
// for elapsed < ten_seconds {
|
||||
//}
|
||||
// for
|
||||
}
|
||||
Reference in new issue
Block a user