Disable logging. Version uses TCP_CORK option

This commit is contained in:
ftc
2023-03-14 23:30:58 +03:00
parent 9bf8c97ebf
commit 37dc90a65a
6 changed files with 21 additions and 10 deletions
+2
View File
@@ -6,6 +6,7 @@ using namespace std;
void LogTime(const string &message)
{
#ifdef LOGGING_ENABLED
static auto start = chrono::high_resolution_clock::now();
static auto prev = start;
auto current = chrono::high_resolution_clock::now();
@@ -13,4 +14,5 @@ void LogTime(const string &message)
auto nsec_prev = chrono::duration_cast<chrono::nanoseconds>(current - prev).count();
cerr << (nsec / 1000000.f) << " " << message << " delta " << (nsec_prev / 1000000.0f) << "\n";
prev = current;
#endif
}