moved timing check definitions to serval.h

This commit is contained in:
gardners 2012-06-20 12:57:12 +09:30 committed by Jeremy Lakeman
parent f6cce7103d
commit 6023cd4da2
2 changed files with 6 additions and 2 deletions

View File

@ -84,7 +84,7 @@ void TIMING_PAUSE()
} }
/* @PGS/20120615 */ /* @PGS/20120615 */
void TIMING_CHECK(const char *file,const char *func,int line) void _TIMING_CHECK(const char *file,const char *func,int line)
{ {
long long now=overlay_gettime_ms(); long long now=overlay_gettime_ms();
if (last_valid) { if (last_valid) {
@ -103,7 +103,6 @@ void TIMING_CHECK(const char *file,const char *func,int line)
last_line=line; last_line=line;
last_time=now; last_time=now;
} }
#define TIMING_CHECK() TIMING_CHECK(__FILE__,__FUNCTION__,__LINE__)
int overlayMode=0; int overlayMode=0;

View File

@ -114,6 +114,11 @@ struct in_addr {
/* bzero(3) is deprecated in favour of memset(3). */ /* bzero(3) is deprecated in favour of memset(3). */
#define bzero(addr,len) memset((addr), 0, (len)) #define bzero(addr,len) memset((addr), 0, (len))
/* @PGS/20120615 */
#define TIMING_CHECK() _TIMING_CHECK(__FILE__,__FUNCTION__,__LINE__)
void _TIMING_CHECK(const char *file,const char *func,int line);
void TIMING_PAUSE();
/* UDP Port numbers for various Serval services. /* UDP Port numbers for various Serval services.
The overlay mesh works over DNA */ The overlay mesh works over DNA */
#define PORT_DNA 4110 #define PORT_DNA 4110