Documentation
¶
Index ¶
- Variables
- func MSToTime(timeMSecs int64) *time.Time
- func Now() *time.Time
- func ParseTimeMS(timeStr string) (int64, error)
- func ParseTimeMSBy(layout, timeStr string) (int64, error)
- func Time() float64
- func TimeMS() int64
- func ToDateStr(timestamp int64, format string) string
- func ToDateStrLoc(timestamp int64, format string) string
- func ToTime(timestamp int64) time.Time
- func UTCStamp() int64
- func UTCTime() float64
- type RetryWaits
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CurTimeMS = int64(0) UTCLocale, _ = time.LoadLocation("UTC") LocShow *time.Location // 用于显示的时区 )
Functions ¶
func ParseTimeMS ¶
ParseTimeMS Convert time string to 13-digit millisecond timestamp Supported forms: 将时间字符串转为13位毫秒时间戳 支持的形式: 2006 200601 20060102 2006-01-02 10-digit timestamp 13-digit timestamp 2006-01-02 15:04 2006-01-02 15:04:05
func ParseTimeMSBy ¶
func TimeMS ¶
func TimeMS() int64
TimeMS Get the current 13-digit millisecond timestamp 获取当前13位毫秒时间戳
func ToDateStr ¶
ToDateStr Convert timestamp to time string 将时间戳转为时间字符串 format default: 2006-01-02 15:04:05
func ToDateStrLoc ¶
Types ¶
type RetryWaits ¶ added in v0.2.16
type RetryWaits struct {
// contains filtered or unexported fields
}
func NewRetryWaits ¶ added in v0.2.16
func NewRetryWaits(rate float64, waits []int64) *RetryWaits
NewRetryWaits waits is array of sleep milliseconds while fail
func (*RetryWaits) NextRetry ¶ added in v0.2.16
func (r *RetryWaits) NextRetry(key string) int64
func (*RetryWaits) Reset ¶ added in v0.2.16
func (r *RetryWaits) Reset(key string)
func (*RetryWaits) SetFail ¶ added in v0.2.16
func (r *RetryWaits) SetFail(key string) int64
Click to show internal directories.
Click to hide internal directories.