mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #8522 from gyuho/lessor
lease: use time.Until in 'Remaining'
This commit is contained in:
commit
70c20a9e73
@ -627,7 +627,7 @@ func (l *Lease) Remaining() time.Duration {
|
|||||||
if l.expiry.IsZero() {
|
if l.expiry.IsZero() {
|
||||||
return time.Duration(math.MaxInt64)
|
return time.Duration(math.MaxInt64)
|
||||||
}
|
}
|
||||||
return l.expiry.Sub(time.Now())
|
return time.Until(l.expiry)
|
||||||
}
|
}
|
||||||
|
|
||||||
type LeaseItem struct {
|
type LeaseItem struct {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user