Merge pull request #4253 from Roasbeef/fix-go12-duration

cmd/lncli: remove usage of Millisecond() for Go 1.12
This commit is contained in:
Olaoluwa Osuntokun 2020-05-08 16:20:39 -07:00 committed by GitHub
commit db7eac35d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -605,8 +605,8 @@ func formatPayment(payment *lnrpc.Payment, aliases *aliasCache) string {
return "-" return "-"
} }
resolveTime := time.Unix(0, timeNs) resolveTime := time.Unix(0, timeNs)
resolveTimeMs := resolveTime.Sub(createTime). resolveTimeDiff := resolveTime.Sub(createTime)
Milliseconds() resolveTimeMs := resolveTimeDiff / time.Millisecond
return fmt.Sprintf( return fmt.Sprintf(
"%.3f", float64(resolveTimeMs)/1000.0, "%.3f", float64(resolveTimeMs)/1000.0,
) )