时间可以快速获取当前小时

This commit is contained in:
刘祥超
2024-03-12 16:20:38 +08:00
parent 6d8be979db
commit bf08170f6d
2 changed files with 11 additions and 0 deletions

View File

@@ -38,6 +38,11 @@ func TestFastTime_Format(t *testing.T) {
t.Log(now.Format("Y-m-d H:i:s"))
}
func TestFastTime_Hour(t *testing.T) {
var now = fasttime.Now()
t.Log(now.Hour())
}
func BenchmarkNewFastTime(b *testing.B) {
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {