should use time.Since instead of time.Now().Sub
This commit is contained in:

committed by
Guoliang Wang

parent
a5c3c8d16c
commit
89669283fe
@@ -163,7 +163,7 @@ func (nm *NamespaceController) worker() {
|
||||
func (nm *NamespaceController) syncNamespaceFromKey(key string) (err error) {
|
||||
startTime := time.Now()
|
||||
defer func() {
|
||||
glog.V(4).Infof("Finished syncing namespace %q (%v)", key, time.Now().Sub(startTime))
|
||||
glog.V(4).Infof("Finished syncing namespace %q (%v)", key, time.Since(startTime))
|
||||
}()
|
||||
|
||||
namespace, err := nm.lister.Get(key)
|
||||
|
Reference in New Issue
Block a user