]> Cypherpunks repositories - gostls13.git/commit
time: Add Until helper function
authorSam Whited <sam@samwhited.com>
Wed, 2 Mar 2016 06:00:23 +0000 (00:00 -0600)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 30 Aug 2016 00:10:47 +0000 (00:10 +0000)
commit67ea710792eabdae1182e2bf4845f512136cccce
tree9ae518501aadf81c29bb15d50582227e5401b250
parent9f8335b7e72bdb2b95055c69f2d4b453b73646df
time: Add Until helper function

Adds an Until() function that returns the duration until the given time.
This compliments the existing Since() function and makes writing
expressions that have expiration times more readable; for example:

    <-After(time.Until(connExpires)):

Fixes #14595

Change-Id: I87998a924b11d4dad5512e010b29d2da6b123456
Reviewed-on: https://go-review.googlesource.com/20118
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/time/time.go