fixed small speed in standalone mode; searching for reasons of the same for network mode

This commit is contained in:
2023-04-06 16:01:28 +03:00
parent 070df2be89
commit e9f1c67055
10 changed files with 268 additions and 213 deletions

View File

@@ -19,6 +19,7 @@
#pragma once
#include <pthread.h>
#include <stdint.h>
#include <usefull_macros.h>
// max & min TCP socket port number
#define PORTN_MAX (65535)
@@ -37,6 +38,15 @@
// client will disconnect after this time from last server message
#define CLIENT_TIMEOUT (3.0)
#ifdef EBUG
extern double __t0;
#define TIMEINIT() do{__t0 = dtime();}while(0)
#define TIMESTAMP(...) do{DBG(__VA_ARGS__); fprintf(stderr, COLOR_GREEN "%g" COLOR_OLD "\n", dtime()-__t0);}while(0)
#else
#define TIMEINIT()
#define TIMESTAMP()
#endif
extern pthread_mutex_t locmutex;
typedef enum{