Added NODELAY option to both server and client

This commit is contained in:
ftc
2023-03-14 23:17:02 +03:00
parent 0a83c1a447
commit 9bf8c97ebf
7 changed files with 45 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
#include "log.h"
#include <chrono>
#include <iostream>
using namespace std;
void LogTime(const string &message)
{
static auto start = chrono::high_resolution_clock::now();
static auto prev = start;
auto current = chrono::high_resolution_clock::now();
auto nsec = chrono::duration_cast<chrono::nanoseconds>(current - start).count();
auto nsec_prev = chrono::duration_cast<chrono::nanoseconds>(current - prev).count();
cerr << (nsec / 1000000.f) << " " << message << " delta " << (nsec_prev / 1000000.0f) << "\n";
prev = current;
}