2018-04-09 17:55:46 +08:00
|
|
|
// Copyright 2017 gf Author(https://gitee.com/johng/gf). All Rights Reserved.
|
|
|
|
//
|
|
|
|
// This Source Code Form is subject to the terms of the MIT License.
|
|
|
|
// If a copy of the MIT was not distributed with this file,
|
|
|
|
// You can obtain one at https://gitee.com/johng/gf.
|
|
|
|
|
2018-06-21 11:44:58 +08:00
|
|
|
package gtime
|
2018-04-09 17:55:46 +08:00
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func BenchmarkNanosecond(b *testing.B) {
|
|
|
|
for i := 0; i < b.N; i++ {
|
2018-06-21 11:44:58 +08:00
|
|
|
Nanosecond()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func BenchmarkStrToTime(b *testing.B) {
|
|
|
|
for i := 0; i < b.N; i++ {
|
|
|
|
StrToTime("2018-02-09T20:46:17.897Z")
|
2018-04-09 17:55:46 +08:00
|
|
|
}
|
|
|
|
}
|