Skip to content

Instantly share code, notes, and snippets.

@BumpeiShimada
Last active October 19, 2022 14: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 BumpeiShimada/6f0f69b310514070aea7524df3b0dad4 to your computer and use it in GitHub Desktop.
Save BumpeiShimada/6f0f69b310514070aea7524df3b0dad4 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"time"
)
func main() {
now := time.Now()
time.Sleep(time.Second * 3)
elapsed := time.Since(now)
fmt.Printf("Took %s", elapsed) // Output: Took 3s
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment