Use newer version of TimeDelta and TimeStamp factories in webrtc find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Micros<\(.*\)>()/TimeDelta::Micros(\1)/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Millis<\(.*\)>()/TimeDelta::Millis(\1)/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Seconds<\(.*\)>()/TimeDelta::Seconds(\1)/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::us/TimeDelta::Micros/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::ms/TimeDelta::Millis/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::seconds/TimeDelta::Seconds/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Micros<\(.*\)>()/Timestamp::Micros(\1)/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Millis<\(.*\)>()/Timestamp::Millis(\1)/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Seconds<\(.*\)>()/Timestamp::Seconds(\1)/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::us/Timestamp::Micros/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::ms/Timestamp::Millis/g" find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::seconds/Timestamp::Seconds/g" git cl format Bug: None Change-Id: I87469d2e4a38369654da839ab7c838215a7911e7 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168402 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30491}
diff --git a/test/time_controller/simulated_thread.cc b/test/time_controller/simulated_thread.cc index 937fe32..8d1637c 100644 --- a/test/time_controller/simulated_thread.cc +++ b/test/time_controller/simulated_thread.cc
@@ -63,7 +63,7 @@ if (delay_ms == kForever) { next_run_time_ = Timestamp::PlusInfinity(); } else { - next_run_time_ = at_time + TimeDelta::ms(delay_ms); + next_run_time_ = at_time + TimeDelta::Millis(delay_ms); } } @@ -107,7 +107,7 @@ rtc::Thread::PostDelayed(posted_from, delay_ms, phandler, id, pdata); rtc::CritScope lock(&lock_); next_run_time_ = - std::min(next_run_time_, Timestamp::ms(rtc::TimeMillis() + delay_ms)); + std::min(next_run_time_, Timestamp::Millis(rtc::TimeMillis() + delay_ms)); } void SimulatedThread::PostAt(const rtc::Location& posted_from, @@ -117,7 +117,7 @@ rtc::MessageData* pdata) { rtc::Thread::PostAt(posted_from, target_time_ms, phandler, id, pdata); rtc::CritScope lock(&lock_); - next_run_time_ = std::min(next_run_time_, Timestamp::ms(target_time_ms)); + next_run_time_ = std::min(next_run_time_, Timestamp::Millis(target_time_ms)); } void SimulatedThread::Stop() {