diff --git a/td/mtproto/RawConnection.cpp b/td/mtproto/RawConnection.cpp index 776ded6f2..c7b196eaa 100644 --- a/td/mtproto/RawConnection.cpp +++ b/td/mtproto/RawConnection.cpp @@ -25,7 +25,6 @@ #include "td/utils/SliceBuilder.h" #include "td/utils/Status.h" #include "td/utils/StorerBase.h" -#include "td/utils/Timer.h" #include #include @@ -248,7 +247,6 @@ class RawConnectionDefault final : public RawConnection { if (has_error_) { return Status::Error("Connection has already failed"); } - PerfWarningTimer timer("RawConnection::do_flush", 0.01); sync_with_poll(socket_fd_); // read/write diff --git a/td/mtproto/SessionConnection.cpp b/td/mtproto/SessionConnection.cpp index eb6b35966..63e785b37 100644 --- a/td/mtproto/SessionConnection.cpp +++ b/td/mtproto/SessionConnection.cpp @@ -26,6 +26,7 @@ #include "td/utils/ScopeGuard.h" #include "td/utils/SliceBuilder.h" #include "td/utils/Time.h" +#include "td/utils/Timer.h" #include "td/utils/tl_parsers.h" #include "td/utils/TlDowncastHelper.h" @@ -1027,6 +1028,7 @@ Status SessionConnection::do_flush() { << connected_flag_ << ' ' << is_main_ << ' ' << need_destroy_auth_key_ << ' ' << sent_destroy_auth_key_ << ' ' << callback_ << ' ' << (Time::now() - created_at_) << ' ' << (Time::now() - last_read_at_); + PerfWarningTimer timer("SessionConnection::do_flush", 0.01); CHECK(state_ != Closed); if (state_ == Init) { TRY_STATUS(init());