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

Unified Diff: go/src/infra/libs/clock/systemtimer.go

Issue 1223213002: Remove libs/clock in favor of luci-go/common/clock. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@abstract
Patch Set: rebase Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « go/src/infra/libs/clock/systemclock.go ('k') | go/src/infra/libs/clock/systemtimer_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: go/src/infra/libs/clock/systemtimer.go
diff --git a/go/src/infra/libs/clock/systemtimer.go b/go/src/infra/libs/clock/systemtimer.go
deleted file mode 100644
index 84b31dc5e8eba1efcff76df918d2147c0477ada0..0000000000000000000000000000000000000000
--- a/go/src/infra/libs/clock/systemtimer.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package clock
-
-import (
- "time"
-)
-
-// A Timer implementation that uses time.Timer.
-type systemTimer struct {
- T *time.Timer // The underlying timer. Starts as nil, is initialized on Reset.
-}
-
-var _ Timer = (*systemTimer)(nil)
-
-func (t *systemTimer) GetC() (c <-chan time.Time) {
- if t.T != nil {
- c = t.T.C
- }
- return
-}
-
-func (t *systemTimer) Reset(d time.Duration) bool {
- if t.T == nil {
- t.T = time.NewTimer(d)
- return false
- }
- return t.T.Reset(d)
-}
-
-func (t *systemTimer) Stop() bool {
- if t.T == nil {
- return false
- }
- return t.T.Stop()
-}
« no previous file with comments | « go/src/infra/libs/clock/systemclock.go ('k') | go/src/infra/libs/clock/systemtimer_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698