go/src/time
Sam Whited 67ea710792 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>
2016-08-30 00:10:47 +00:00
..
example_test.go
export_android_test.go time: load time zones from the system tzdata file on Android 2016-08-23 06:15:35 +00:00
export_test.go
export_windows_test.go
format.go time: fix optional fractional seconds range err 2016-08-23 15:58:08 +00:00
format_test.go time: fix optional fractional seconds range err 2016-08-23 15:58:08 +00:00
genzabbrs.go time: genzabbrs.go skips Feb when checking months 2016-06-09 15:31:08 +00:00
internal_test.go
sleep.go time: warn about correct use of a Timer's Stop/Reset methods 2016-06-06 21:15:35 +00:00
sleep_test.go
sys_plan9.go time: don't depend on the io package 2016-05-09 20:31:47 +00:00
sys_unix.go time: don't depend on the io package 2016-05-09 20:31:47 +00:00
sys_windows.go time: don't depend on the io package 2016-05-09 20:31:47 +00:00
tick.go
tick_test.go
time.go time: Add Until helper function 2016-08-30 00:10:47 +00:00
time_test.go all: fix "result not used" vet warnings 2016-08-16 14:15:10 +00:00
zoneinfo.go time: always use $GOROOT/lib/time/zoneinfo.zip with genzabbrs.go 2016-08-28 02:51:07 +00:00
zoneinfo_abbrs_windows.go time: always use $GOROOT/lib/time/zoneinfo.zip with genzabbrs.go 2016-08-28 02:51:07 +00:00
zoneinfo_android.go time: load time zones from the system tzdata file on Android 2016-08-23 06:15:35 +00:00
zoneinfo_android_test.go time: load time zones from the system tzdata file on Android 2016-08-23 06:15:35 +00:00
zoneinfo_ios.go
zoneinfo_plan9.go
zoneinfo_read.go time: don't depend on the io package 2016-05-09 20:31:47 +00:00
zoneinfo_test.go time: set Local.name on windows 2016-05-14 17:30:16 +00:00
zoneinfo_unix.go time: load time zones from the system tzdata file on Android 2016-08-23 06:15:35 +00:00
zoneinfo_windows.go time: always use $GOROOT/lib/time/zoneinfo.zip with genzabbrs.go 2016-08-28 02:51:07 +00:00
zoneinfo_windows_test.go