Add shared MockClock class and cleaned up base::Clock usage

Change-Id: I8492747700274591eab1a3f591ddb94814723943
Reviewed-on: https://weave-review.googlesource.com/1870
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
diff --git a/src/test/mock_clock.h b/src/test/mock_clock.h
new file mode 100644
index 0000000..f1a2260
--- /dev/null
+++ b/src/test/mock_clock.h
@@ -0,0 +1,22 @@
+// Copyright 2015 The Weave Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef LIBWEAVE_SRC_TEST_MOCK_CLOCK_H_
+#define LIBWEAVE_SRC_TEST_MOCK_CLOCK_H_
+
+#include <base/time/clock.h>
+#include <gmock/gmock.h>
+
+namespace weave {
+namespace test {
+
+class MockClock : public base::Clock {
+ public:
+  MOCK_METHOD0(Now, base::Time());
+};
+
+}  // namespace test
+}  // namespace weave
+
+#endif  // LIBWEAVE_SRC_TEST_MOCK_CLOCK_H_