forked from crosswalk-project/chromium-crosswalk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquic_clock.cc
30 lines (21 loc) · 797 Bytes
/
quic_clock.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) 2012 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.
#include "net/quic/quic_clock.h"
#include "base/time/time.h"
namespace net {
QuicClock::QuicClock() {}
QuicClock::~QuicClock() {}
QuicTime QuicClock::ApproximateNow() const {
// At the moment, Chrome does not have a distinct notion of ApproximateNow().
// We should consider implementing this using MessageLoop::recent_time_.
return Now();
}
QuicTime QuicClock::Now() const {
return QuicTime(base::TimeTicks::Now());
}
QuicWallTime QuicClock::WallNow() const {
return QuicWallTime::FromUNIXMicroseconds(base::Time::Now().ToJavaTime() *
1000);
}
} // namespace net