this->Res = 0;
this->ConfigThread = NULL;
- // Initialise TIME
- clock_gettime(CLOCK_REALTIME, &TIME);
+ UpdateTime();
this->startup_time = TIME.tv_sec;
// This must be created first, so other parts of Insp can use it while starting up
}
#else
WindowsIPC = new IPC;
- if(!Config->nofork)
+ if(!Config->cmdline.nofork)
{
WindowsForkKillOwner();
FreeConsole();
void InspIRCd::UpdateTime()
{
+#ifdef HAS_CLOCK_GETTIME
clock_gettime(CLOCK_REALTIME, &TIME);
+#else
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ TIME.tv_sec = tv.tv_sec;
+ TIME.tv_nsec = tv.tv_usec * 1000;
+#endif
}
int InspIRCd::Run()