These factories suppose to replace set of old constexpr factories that
takes parameter as template rather than function parameter,
as well as fix function naming to follow style guide of the second set
of factory functions.
Bug: None
Change-Id: Icd76302b821b2a4027f9d6765cf91bc9190f551c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167521
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30482}
Negative infinity is useful in comparisons as it represents a value
guaranteed to be less than any other timestamp. This avoid using
Timestamp::ms(0) to represent such a value or having to use optional
for the special case of first time execution.
To avoid ambiguity, Timestamp::Infinity is renamed to PlusInfinity.
Bug: webrtc:9709
Change-Id: Ib2debff91036e94d1dc903ec0c6faae30febde4e
Reviewed-on: https://webrtc-review.googlesource.com/79440
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24556}
This prepares for allowing use making arithmetic operators constexpr.
This also makes it easier to use for comparisons with offsets.
Now a > b + 10 ms works even if b is infinite.
Bug: webrtc:9574
Change-Id: Ie36092b72c2ec0f0c541641199a39155f5a796f3
Reviewed-on: https://webrtc-review.googlesource.com/96820
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24530}
This adds new constexpr create function for DataSize, DataRate,
TimeDelta and Timestamp. The names are capitalized to mirror the
naming scheme of the previously constexpr methods (Zero and
Infinity create functions). They are also kept longer since they
are not expected to be used in complex expressions.
Bug: webrtc:9574
Change-Id: I5950548718675050fc5d66699de295455c310861
Reviewed-on: https://webrtc-review.googlesource.com/91161
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24218}
This makes the constructor and the unchecked create functions
constexpr on the unit classes Timestamp, TimeDelta, Datarate and
DataSize. This allows using the units in constexpr constants.
Unchecked access methods are made constexpr as well. Making them
usable in static asserts.
Constexpr create functions for checked construction is added in
a separate CL.
Bug: webrtc:9574
Change-Id: I605ae2e8572195dbb2078c283056208be0f43333
Reviewed-on: https://webrtc-review.googlesource.com/91160
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24206}
This prepares for being able to inject network congestion controllers.
And makes it easier to use the units in other parts of the code.
Bug: webrtc:9155
Change-Id: Ib8f9c1c97b06d791a01c3376046933d576ae46f9
Reviewed-on: https://webrtc-review.googlesource.com/70201
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23168}
2018-05-08 11:46:22 +00:00
Renamed from modules/congestion_controller/network_control/units/timestamp_unittest.cc (Browse further)