start counter for uptime at launch

This commit is contained in:
ehouse 2008-12-31 04:19:23 +00:00
parent 0bd95617e9
commit 241d22262e
2 changed files with 4 additions and 2 deletions

View file

@ -327,7 +327,7 @@ killSocket( int socket, const char* why )
}
time_t
now()
now( void )
{
static time_t startTime = time(NULL);
return time(NULL) - startTime;
@ -524,6 +524,8 @@ main( int argc, char** argv )
bool doDaemon = true;
bool doFork = true;
(void)now(); /* force capture of start time */
/* Verify sizes here... */
assert( sizeof(CookieID) == 2 );

View file

@ -21,7 +21,7 @@ void killSocket( int socket, const char* why );
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 );