diff options
author | Jordan Bayles <jophba@chromium.org> | 2020-06-02 15:51:31 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-06-03 14:49:40 +0000 |
commit | c9201dd611b0aa8d66fe7ef2749c7ce0c157f0a1 (patch) | |
tree | 35865dd50de7765c9c82abb42c74a7d70a4b8178 /cast/streaming/sender_packet_router.cc | |
parent | 724a60fb10c7042a3e00eb4f1cf25b41b88b0c8b (diff) | |
download | openscreen-c9201dd611b0aa8d66fe7ef2749c7ce0c157f0a1.tar.gz |
Move std::chrono using statements to util/
This patch moves openscreen::<time type> using statements to be part of
a new util/ header, chrono_helpers.h. Some helpful convenience
functions are provided for doing conversions, and a new conversion
method, to_duration, is added to the Clock implementation.
Change-Id: I5a153c4da5266bceea97de0cad00a71a739f71ca
Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2222684
Reviewed-by: mark a. foltz <mfoltz@chromium.org>
Reviewed-by: Ryan Keane <rwkeane@google.com>
Commit-Queue: Jordan Bayles <jophba@chromium.org>
Diffstat (limited to 'cast/streaming/sender_packet_router.cc')
-rw-r--r-- | cast/streaming/sender_packet_router.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cast/streaming/sender_packet_router.cc b/cast/streaming/sender_packet_router.cc index 71fb2991..c3fccd18 100644 --- a/cast/streaming/sender_packet_router.cc +++ b/cast/streaming/sender_packet_router.cc @@ -9,6 +9,7 @@ #include "cast/streaming/constants.h" #include "cast/streaming/packet_util.h" +#include "util/chrono_helpers.h" #include "util/osp_logging.h" #include "util/saturate_cast.h" #include "util/stringprintf.h" @@ -223,8 +224,7 @@ int SenderPacketRouter::SendJustTheRtpPackets(Clock::time_point send_time, namespace { constexpr int kBitsPerByte = 8; -constexpr auto kOneSecondInMilliseconds = - duration_cast<milliseconds>(seconds(1)); +constexpr auto kOneSecondInMilliseconds = to_microseconds(seconds(1)); } // namespace // static |