Last active
October 14, 2019 09:45
-
-
Save Mayankgupta688/c3229047b60a02244eeec2f8d965dd48 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
start := time.Now() | |
func() { | |
for i:=0; i < 3; i++ { | |
fmt.Println(i) | |
} | |
}() | |
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