mirror of
https://gitee.com/dromara/carbon.git
synced 2024-12-02 04:07:36 +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()
|
|
}
|
|
}
|