mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-28 16:00:37 +01:00
seems something wrong with the timing
This commit is contained in:
1 parent
22ef015cff
commit
0059f4a201
16 files changed
+2712
-25
No files matched your search
@@ -0,0 +1,18 @@
|
||||
package udptransfer
|
||||
|
||||
import "time"
|
||||
|
||||
const Millisecond = 1e6
|
||||
|
||||
func Now() int64 {
|
||||
return time.Now().UnixNano()/Millisecond
|
||||
}
|
||||
|
||||
func NowNS() int64 {
|
||||
return time.Now().UnixNano()
|
||||
}
|
||||
|
||||
func NewTimerChan(d int64) <-chan time.Time {
|
||||
ticker := time.NewTimer(time.Duration(d) * time.Millisecond)
|
||||
return ticker.C
|
||||
}
|
||||
Reference in new issue
Block a user