Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(509)

Side by Side Diff: common/clock/external.go

Issue 2134673003: milo: buildbucket builer view (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: rebased and regenerated expectations Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « appengine/gaeauth/client/client.go ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The LUCI Authors. All rights reserved. 1 // Copyright 2015 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package clock 5 package clock
6 6
7 import ( 7 import (
8 "time" 8 "time"
9 9
10 "golang.org/x/net/context" 10 "golang.org/x/net/context"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // NewTimer calls Clock.NewTimer on the Clock instance stored in the supplied 53 // NewTimer calls Clock.NewTimer on the Clock instance stored in the supplied
54 // Context. 54 // Context.
55 func NewTimer(ctx context.Context) Timer { 55 func NewTimer(ctx context.Context) Timer {
56 return Get(ctx).NewTimer(ctx) 56 return Get(ctx).NewTimer(ctx)
57 } 57 }
58 58
59 // After calls Clock.After on the Clock instance stored in the supplied Context. 59 // After calls Clock.After on the Clock instance stored in the supplied Context.
60 func After(ctx context.Context, d time.Duration) <-chan TimerResult { 60 func After(ctx context.Context, d time.Duration) <-chan TimerResult {
61 return Get(ctx).After(ctx, d) 61 return Get(ctx).After(ctx, d)
62 } 62 }
63
64 // Since is an equivalent of time.Since.
65 func Since(ctx context.Context, t time.Time) time.Duration {
66 return Now(ctx).Sub(t)
67 }
OLDNEW
« no previous file with comments | « appengine/gaeauth/client/client.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698