Skip to content

Commit

Permalink
Don't use std::chrono_literals
Browse files Browse the repository at this point in the history
  • Loading branch information
CJLove committed Sep 3, 2021
1 parent 486dc51 commit 8ee1c16
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions example/example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,17 +209,16 @@ void stopwatch_example()
spdlog::info("Stopwatch: {} seconds", sw);
}

using namespace std::chrono_literals;
void udp_example()
{
spdlog::sinks::udp_sink_config cfg("127.0.0.1", 11091);
auto my_logger = spdlog::udp_logger_mt("udplog", cfg);
my_logger->set_level(spdlog::level::debug);
for (int i = 0; i < 10; i++) {
my_logger->info("hello world {}", i);
#ifndef _WIN32
#ifdef _WIN32
// sendto() on winsock will drop packets if sent too quickly
std::this_thread::sleep_for(40ms);
std::this_thread::sleep_for(std::chrono::milliseconds(40));
#endif
}
}
Expand Down

0 comments on commit 8ee1c16

Please sign in to comment.