Skip to content

Commit

Permalink
Fixed std::lock_guard
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko committed Jul 4, 2024
1 parent 8558a61 commit f8aee2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions xtransmit/metrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ bool validate_packet_checksum(const const_buffer& payload)

std:: string validator::stats()
{
std::lock_guard lock(m_mtx);
std::lock_guard<std::mutex> lock(m_mtx);
std::stringstream ss;

auto latency_str = [](long long val, long long na_val) -> string {
Expand Down Expand Up @@ -212,7 +212,7 @@ string validator::stats_csv()
{
stringstream ss;

std::lock_guard lock(m_mtx);
std::lock_guard<std::mutex> lock(m_mtx);
#ifdef HAS_PUT_TIME
ss << print_timestamp_now() << ',';
#endif
Expand Down
2 changes: 1 addition & 1 deletion xtransmit/metrics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace metrics

inline void validate_packet(const const_buffer& payload)
{
std::lock_guard lock(m_mtx);
std::lock_guard<std::mutex> lock(m_mtx);
const auto sys_time_now = system_clock::now();
const auto std_time_now = steady_clock::now();

Expand Down

0 comments on commit f8aee2b

Please sign in to comment.