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

Unified Diff: go/src/infra/tools/cipd/clock.go

Issue 1129043003: cipd: Refactor client to make it more readable. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: be more careful with network error handling Created 5 years, 7 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
Index: go/src/infra/tools/cipd/clock.go
diff --git a/go/src/infra/tools/cipd/clock.go b/go/src/infra/tools/cipd/clock.go
deleted file mode 100644
index 02ccde6f2809ecd860086ed9c41a9394968bc47c..0000000000000000000000000000000000000000
--- a/go/src/infra/tools/cipd/clock.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2014 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 cipd
-
-import "time"
-
-// clock is a global mockable clock instance.
-var clock clockInterface = &realClock{}
-
-type clockInterface interface {
- Now() time.Time
- Sleep(time.Duration)
-}
-
-type realClock struct{}
-
-func (c *realClock) Now() time.Time { return time.Now() }
-func (c *realClock) Sleep(d time.Duration) { time.Sleep(d) }

Powered by Google App Engine
This is Rietveld 408576698