Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package main
import (
"fmt"
"time"
)
func main() {
start := time.Now()
go func() {
for i:=0; i < 3; i++ {
fmt.Println(i)
}
}()
go func() {
for i:=0; i < 3; i++ {
fmt.Println(i)
}
}()
elapsedTime := time.Since(start)
fmt.Println("Total Time For Execution: " + elapsedTime.String())
time.Sleep(time.Second)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.