Adds product operator for TimeDelta and Frequency
Also adding kHz factory function for Frequency class. Bug: webrtc:9883 Change-Id: Ide44910d50eb9616de2bb0c66b8c62493d2be92e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167725 Commit-Queue: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Ali Tofigh <alito@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30416}
This commit is contained in:
committed by
Commit Bot
parent
184ea66aed
commit
1cf15bfe55
@ -154,6 +154,7 @@ TEST(FrequencyTest, InfinityOperations) {
|
||||
TEST(UnitConversionTest, TimeDeltaAndFrequency) {
|
||||
EXPECT_EQ(1 / Frequency::hertz(50), TimeDelta::ms(20));
|
||||
EXPECT_EQ(1 / TimeDelta::ms(20), Frequency::hertz(50));
|
||||
EXPECT_EQ(Frequency::kHz(200) * TimeDelta::ms(2), 400.0);
|
||||
}
|
||||
} // namespace test
|
||||
} // namespace webrtc
|
||||
|
||||
Reference in New Issue
Block a user