github.com/GeniusesGroup/libgo@v0.0.0-20220929090155-5ff932cb408e/time/unix/time_test.go (about) 1 /* For license and copyright information please see LEGAL file in repository */ 2 3 package unix 4 5 import ( 6 "fmt" 7 "testing" 8 "time" 9 ) 10 11 func Test_ShowNow(t *testing.T) { 12 var ti Time = Now() 13 fmt.Println(ti) 14 fmt.Println(ti.NanoElapsed()) 15 fmt.Println(ti.MicroElapsed()) 16 fmt.Println(ti.MilliElapsed()) 17 fmt.Println(ti.SecElapsed()) 18 19 var timeNow = time.Now() 20 fmt.Println(timeNow.Unix()) 21 fmt.Println(timeNow.UnixMilli()) 22 fmt.Println(timeNow.UnixMicro()) 23 fmt.Println(timeNow.UnixNano()) 24 }