Skip to content

Instantly share code, notes, and snippets.

@berkant
Last active September 1, 2018 08:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save berkant/205aefe08a29113e8b605ab57d1caa84 to your computer and use it in GitHub Desktop.
Save berkant/205aefe08a29113e8b605ab57d1caa84 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"time"
"runtime"
)
func printTime() {
for i := 0; i < 5; i++ {
time.Sleep(time.Millisecond)
fmt.Println(time.Now())
}
}
func main() {
runtime.GOMAXPROCS(1)
go printTime()
printTime()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment