Change default timestamp to 64 bits in all webrtc directories.
BUG=
R=pbos@webrtc.org, pthatcher@webrtc.org, solenberg@webrtc.org
Review URL: https://codereview.webrtc.org/1835053002 .
Cr-Commit-Position: refs/heads/master@{#12646}
diff --git a/webrtc/api/dtmfsender_unittest.cc b/webrtc/api/dtmfsender_unittest.cc
index efe568d..e5fe261 100644
--- a/webrtc/api/dtmfsender_unittest.cc
+++ b/webrtc/api/dtmfsender_unittest.cc
@@ -85,9 +85,9 @@
// TODO(ronghuawu): Make the timer (basically the rtc::TimeNanos)
// mockable and use a fake timer in the unit tests.
if (last_insert_dtmf_call_ > 0) {
- gap = static_cast<int>(rtc::Time() - last_insert_dtmf_call_);
+ gap = static_cast<int>(rtc::TimeMillis() - last_insert_dtmf_call_);
}
- last_insert_dtmf_call_ = rtc::Time();
+ last_insert_dtmf_call_ = rtc::TimeMillis();
LOG(LS_VERBOSE) << "FakeDtmfProvider::InsertDtmf code=" << code
<< " duration=" << duration
diff --git a/webrtc/api/peerconnectionendtoend_unittest.cc b/webrtc/api/peerconnectionendtoend_unittest.cc
index 95369b1..40bb437 100644
--- a/webrtc/api/peerconnectionendtoend_unittest.cc
+++ b/webrtc/api/peerconnectionendtoend_unittest.cc
@@ -38,7 +38,7 @@
namespace {
-const size_t kMaxWait = 10000;
+const int kMaxWait = 10000;
} // namespace
diff --git a/webrtc/api/peerconnectionfactory.cc b/webrtc/api/peerconnectionfactory.cc
index ff8098c..b2a3798 100644
--- a/webrtc/api/peerconnectionfactory.cc
+++ b/webrtc/api/peerconnectionfactory.cc
@@ -153,7 +153,7 @@
bool PeerConnectionFactory::Initialize() {
RTC_DCHECK(signaling_thread_->IsCurrent());
- rtc::InitRandom(rtc::Time());
+ rtc::InitRandom(rtc::Time32());
default_network_manager_.reset(new rtc::BasicNetworkManager());
if (!default_network_manager_) {
diff --git a/webrtc/api/test/fakeaudiocapturemodule.cc b/webrtc/api/test/fakeaudiocapturemodule.cc
index 0ab493d..a32ef64 100644
--- a/webrtc/api/test/fakeaudiocapturemodule.cc
+++ b/webrtc/api/test/fakeaudiocapturemodule.cc
@@ -23,7 +23,7 @@
// Same value as src/modules/audio_device/main/source/audio_device_config.h in
// https://code.google.com/p/webrtc/
-static const uint32_t kAdmMaxIdleTimeProcess = 1000;
+static const int kAdmMaxIdleTimeProcess = 1000;
// Constants here are derived by running VoE using a real ADM.
// The constants correspond to 10ms of mono audio at 44kHz.
@@ -73,12 +73,12 @@
}
int64_t FakeAudioCaptureModule::TimeUntilNextProcess() {
- const uint32_t current_time = rtc::Time();
+ const int64_t current_time = rtc::TimeMillis();
if (current_time < last_process_time_ms_) {
// TODO: wraparound could be handled more gracefully.
return 0;
}
- const uint32_t elapsed_time = current_time - last_process_time_ms_;
+ const int64_t elapsed_time = current_time - last_process_time_ms_;
if (kAdmMaxIdleTimeProcess < elapsed_time) {
return 0;
}
@@ -86,7 +86,7 @@
}
void FakeAudioCaptureModule::Process() {
- last_process_time_ms_ = rtc::Time();
+ last_process_time_ms_ = rtc::TimeMillis();
}
int32_t FakeAudioCaptureModule::ActiveAudioLayer(
@@ -590,7 +590,7 @@
// sent to it. Note that the audio processing pipeline will likely distort the
// original signal.
SetSendBuffer(kHighSampleValue);
- last_process_time_ms_ = rtc::Time();
+ last_process_time_ms_ = rtc::TimeMillis();
return true;
}
@@ -649,7 +649,7 @@
void FakeAudioCaptureModule::ProcessFrameP() {
ASSERT(process_thread_->IsCurrent());
if (!started_) {
- next_frame_time_ = rtc::Time();
+ next_frame_time_ = rtc::TimeMillis();
started_ = true;
}
@@ -665,8 +665,8 @@
}
next_frame_time_ += kTimePerFrameMs;
- const uint32_t current_time = rtc::Time();
- const uint32_t wait_time =
+ const int64_t current_time = rtc::TimeMillis();
+ const int64_t wait_time =
(next_frame_time_ > current_time) ? next_frame_time_ - current_time : 0;
process_thread_->PostDelayed(wait_time, this, MSG_RUN_PROCESS);
}
diff --git a/webrtc/api/test/fakeaudiocapturemodule.h b/webrtc/api/test/fakeaudiocapturemodule.h
index 098243f..ca42c3b 100644
--- a/webrtc/api/test/fakeaudiocapturemodule.h
+++ b/webrtc/api/test/fakeaudiocapturemodule.h
@@ -227,7 +227,7 @@
// The time in milliseconds when Process() was last called or 0 if no call
// has been made.
- uint32_t last_process_time_ms_;
+ int64_t last_process_time_ms_;
// Callback for playout and recording.
webrtc::AudioTransport* audio_callback_;
@@ -247,7 +247,7 @@
// wall clock time the next frame should be generated and received. started_
// ensures that next_frame_time_ can be initialized properly on first call.
bool started_;
- uint32_t next_frame_time_;
+ int64_t next_frame_time_;
std::unique_ptr<rtc::Thread> process_thread_;