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}
This commit is contained in:
committed by
Commit Bot
parent
9b05803e19
commit
0c626afcf3
@ -20,7 +20,7 @@ namespace webrtc_repeating_task_impl {
|
||||
RepeatingTaskBase::RepeatingTaskBase(TaskQueueBase* task_queue,
|
||||
TimeDelta first_delay)
|
||||
: task_queue_(task_queue),
|
||||
next_run_time_(Timestamp::us(rtc::TimeMicros()) + first_delay) {}
|
||||
next_run_time_(Timestamp::Micros(rtc::TimeMicros()) + first_delay) {}
|
||||
|
||||
RepeatingTaskBase::~RepeatingTaskBase() = default;
|
||||
|
||||
@ -38,7 +38,7 @@ bool RepeatingTaskBase::Run() {
|
||||
return true;
|
||||
|
||||
RTC_DCHECK(delay.IsFinite());
|
||||
TimeDelta lost_time = Timestamp::us(rtc::TimeMicros()) - next_run_time_;
|
||||
TimeDelta lost_time = Timestamp::Micros(rtc::TimeMicros()) - next_run_time_;
|
||||
next_run_time_ += delay;
|
||||
delay -= lost_time;
|
||||
delay = std::max(delay, TimeDelta::Zero());
|
||||
|
||||
Reference in New Issue
Block a user