diff options
| author | chrislu <chris.lu@gmail.com> | 2022-06-27 12:40:47 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-06-27 12:40:47 -0700 |
| commit | 4a65159250c0ca7cf0fc203dd300bf402c1016f9 (patch) | |
| tree | b6218ecb4845d8ce6e5765c3efd770278892b7a6 | |
| parent | b9f7b6fb9a486a9509db7ca800c9f876911413ad (diff) | |
| download | seaweedfs-4a65159250c0ca7cf0fc203dd300bf402c1016f9.tar.xz seaweedfs-4a65159250c0ca7cf0fc203dd300bf402c1016f9.zip | |
fix reading time
| -rw-r--r-- | weed/command/filer_sync.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/command/filer_sync.go b/weed/command/filer_sync.go index b7da1baf9..1550d155a 100644 --- a/weed/command/filer_sync.go +++ b/weed/command/filer_sync.go @@ -215,10 +215,10 @@ func doSubscribeFilerMetaChanges(clientId int32, grpcDialOption grpc.DialOption, return persistEventFn(resp) } - var lastLogTsNs = time.Now().Nanosecond() + var lastLogTsNs = time.Now().UnixNano() var clientName = fmt.Sprintf("syncFrom_%s_To_%s", string(sourceFiler), string(targetFiler)) processEventFnWithOffset := pb.AddOffsetFunc(processEventFn, 3*time.Second, func(counter int64, lastTsNs int64) error { - now := time.Now().Nanosecond() + now := time.Now().UnixNano() glog.V(0).Infof("sync %s to %s progressed to %v %0.2f/sec", sourceFiler, targetFiler, time.Unix(0, lastTsNs), float64(counter)/(float64(now-lastLogTsNs)/1e9)) lastLogTsNs = now // collect synchronous offset |
