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

Side by Side Diff: webrtc/system_wrappers/source/tick_util.cc

Issue 1888593004: Delete all use of tick_util.h. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #include "webrtc/system_wrappers/include/tick_util.h"
12
13 #include "webrtc/base/timeutils.h"
14
15 namespace webrtc {
16
17 int64_t TickTime::MillisecondTimestamp() {
18 return TicksToMilliseconds(TickTime::Now().Ticks());
19 }
20
21 int64_t TickTime::MicrosecondTimestamp() {
22 return TicksToMicroseconds(TickTime::Now().Ticks());
23 }
24
25 int64_t TickTime::MillisecondsToTicks(const int64_t ms) {
26 return ms * rtc::kNumNanosecsPerMillisec;
27 }
28
29 int64_t TickTime::TicksToMilliseconds(const int64_t ticks) {
30 return ticks / rtc::kNumNanosecsPerMillisec;
31 }
32
33 int64_t TickTime::TicksToMicroseconds(const int64_t ticks) {
34 return ticks / rtc::kNumNanosecsPerMicrosec;
35 }
36
37 // Gets the native system tick count, converted to nanoseconds.
38 int64_t TickTime::QueryOsForTicks() {
39 return rtc::TimeNanos();
40 }
41
42 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/system_wrappers/source/condition_variable_unittest.cc ('k') | webrtc/system_wrappers/system_wrappers.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698