// Remaining returns the remaining time of the lease. func (l *Lease) Remaining() time.Duration { return time.Duration(l.expiry - monotime.Now()) }
// refresh refreshes the expiry of the lease. func (l *Lease) refresh(extend time.Duration) { l.expiry = monotime.Now().Add(extend + time.Duration(l.ttl)*time.Second) }