mirror of
https://github.com/eddyem/CCD_Capture.git
synced 2026-03-20 08:40:56 +03:00
fixed small speed in standalone mode; searching for reasons of the same for network mode
This commit is contained in:
10
socket.h
10
socket.h
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user