mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
start counter for uptime at launch
This commit is contained in:
parent
0bd95617e9
commit
241d22262e
2 changed files with 4 additions and 2 deletions
|
@ -327,7 +327,7 @@ killSocket( int socket, const char* why )
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t
|
time_t
|
||||||
now()
|
now( void )
|
||||||
{
|
{
|
||||||
static time_t startTime = time(NULL);
|
static time_t startTime = time(NULL);
|
||||||
return time(NULL) - startTime;
|
return time(NULL) - startTime;
|
||||||
|
@ -524,6 +524,8 @@ main( int argc, char** argv )
|
||||||
bool doDaemon = true;
|
bool doDaemon = true;
|
||||||
bool doFork = true;
|
bool doFork = true;
|
||||||
|
|
||||||
|
(void)now(); /* force capture of start time */
|
||||||
|
|
||||||
/* Verify sizes here... */
|
/* Verify sizes here... */
|
||||||
assert( sizeof(CookieID) == 2 );
|
assert( sizeof(CookieID) == 2 );
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ void killSocket( int socket, const char* why );
|
||||||
|
|
||||||
bool send_with_length_unsafe( int socket, unsigned char* buf, int bufLen );
|
bool send_with_length_unsafe( int socket, unsigned char* buf, int bufLen );
|
||||||
|
|
||||||
time_t now();
|
time_t now(void);
|
||||||
|
|
||||||
int make_socket( unsigned long addr, unsigned short port );
|
int make_socket( unsigned long addr, unsigned short port );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue