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

Side by Side Diff: net/quic/test_tools/mock_clock.cc

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | « net/quic/test_tools/mock_clock.h ('k') | net/quic/test_tools/mock_crypto_client_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "net/quic/test_tools/mock_clock.h"
6
7 namespace net {
8
9 MockClock::MockClock() : now_(QuicTime::Zero()) {
10 }
11
12 MockClock::~MockClock() {
13 }
14
15 void MockClock::AdvanceTime(QuicTime::Delta delta) {
16 now_ = now_.Add(delta);
17 }
18
19 QuicTime MockClock::Now() const {
20 return now_;
21 }
22
23 QuicTime MockClock::ApproximateNow() const {
24 return now_;
25 }
26
27 QuicWallTime MockClock::WallNow() const {
28 return QuicWallTime::FromUNIXSeconds(
29 now_.Subtract(QuicTime::Zero()).ToSeconds());
30 }
31
32 base::TimeTicks MockClock::NowInTicks() const {
33 base::TimeTicks ticks;
34 return ticks + base::TimeDelta::FromMicroseconds(
35 now_.Subtract(QuicTime::Zero()).ToMicroseconds());
36 }
37
38 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/mock_clock.h ('k') | net/quic/test_tools/mock_crypto_client_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698