You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lal/pkg/base/adapter_go.go

20 lines
456 B
Go

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

// Copyright 2022, Chef. All rights reserved.
// https://github.com/q191201771/lal
//
// Use of this source code is governed by a MIT-style license
// that can be found in the License file.
//
// Author: Chef (191201771@qq.com)
package base
import "time"
// 兼容老版本的Go不直接使用新版本Go标准库中新增的内容
// TODO(chef): [refactor] 整理到naza中 202212
func UnixMilli(t time.Time) int64 {
return t.UnixNano() / 1e6
}