mirror of
https://gitee.com/dromara/carbon.git
synced 2024-11-29 18:57:37 +08:00
25 lines
403 B
Go
Executable File
25 lines
403 B
Go
Executable File
package carbon
|
|
|
|
import "testing"
|
|
|
|
func BenchmarkCarbon_SetTestNow(b *testing.B) {
|
|
c := NewCarbon()
|
|
for n := 0; n < b.N; n++ {
|
|
c.SetTestNow(Yesterday())
|
|
}
|
|
}
|
|
|
|
func BenchmarkCarbon_UnSetTestNow(b *testing.B) {
|
|
c := NewCarbon()
|
|
for n := 0; n < b.N; n++ {
|
|
c.UnSetTestNow()
|
|
}
|
|
}
|
|
|
|
func BenchmarkCarbon_IsSetTestNow(b *testing.B) {
|
|
c := NewCarbon()
|
|
for n := 0; n < b.N; n++ {
|
|
c.IsSetTestNow()
|
|
}
|
|
}
|