|
|
|
|
|
|
|
|
|
|
|
|
|
|
Report << "\t<timers>" << endl; |
|
|
Report << "\t<timers>" << endl; |
|
|
Report << "\t\t<run started=\'" << Timestamp(StartupTime) << "\' " |
|
|
Report << "\t\t<run started=\'" << Timestamp(StartupTime) << "\' " |
|
|
<< "elapsed=\'" << (int) difftime(Timestamp(), StartupTime) << "\'/>" << endl; |
|
|
|
|
|
|
|
|
<< "elapsed=\'" << SecsSinceStartup() << "\'/>" << endl; |
|
|
|
|
|
|
|
|
Report << "\t\t<sync latest=\'" << Timestamp(Status.LastSyncTime) << "\' " |
|
|
Report << "\t\t<sync latest=\'" << Timestamp(Status.LastSyncTime) << "\' " |
|
|
<< "elapsed=\'" << SecsSinceLastSync() << "\'/>" << endl; |
|
|
<< "elapsed=\'" << SecsSinceLastSync() << "\'/>" << endl; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Report << "\t<timers>" << endl; |
|
|
Report << "\t<timers>" << endl; |
|
|
Report << "\t\t<run started=\'" << Timestamp(StartupTime) << "\' " |
|
|
Report << "\t\t<run started=\'" << Timestamp(StartupTime) << "\' " |
|
|
<< "elapsed=\'" << (int) difftime(Timestamp(), StartupTime) << "\'/>" << endl; |
|
|
|
|
|
|
|
|
<< "elapsed=\'" << SecsSinceStartup() << "\'/>" << endl; |
|
|
|
|
|
|
|
|
Report << "\t\t<sync latest=\'" << Timestamp(Status.LastSyncTime) << "\' " |
|
|
Report << "\t\t<sync latest=\'" << Timestamp(Status.LastSyncTime) << "\' " |
|
|
<< "elapsed=\'" << SecsSinceLastSync() << "\'/>" << endl; |
|
|
<< "elapsed=\'" << SecsSinceLastSync() << "\'/>" << endl; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Report << "\t<timers>" << endl; |
|
|
Report << "\t<timers>" << endl; |
|
|
Report << "\t\t<run started=\'" << Timestamp(StartupTime) << "\' " |
|
|
Report << "\t\t<run started=\'" << Timestamp(StartupTime) << "\' " |
|
|
<< "elapsed=\'" << (int) difftime(Timestamp(), StartupTime) << "\'/>" << endl; |
|
|
|
|
|
|
|
|
<< "elapsed=\'" << SecsSinceStartup() << "\'/>" << endl; |
|
|
|
|
|
|
|
|
Report << "\t\t<sync latest=\'" << Timestamp(Status.LastSyncTime) << "\' " |
|
|
Report << "\t\t<sync latest=\'" << Timestamp(Status.LastSyncTime) << "\' " |
|
|
<< "elapsed=\'" << SecsSinceLastSync() << "\'/>" << endl; |
|
|
<< "elapsed=\'" << SecsSinceLastSync() << "\'/>" << endl; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
time_t snfLOGmgr::Timestamp() { // Get an ordinary timestamp. |
|
|
time_t snfLOGmgr::Timestamp() { // Get an ordinary timestamp. |
|
|
time_t rawtime; |
|
|
time_t rawtime; |
|
|
time(&rawtime); |
|
|
|
|
|
|
|
|
rawtime = time(NULL); |
|
|
return rawtime; |
|
|
return rawtime; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 20090730_M - Moved persistent state aux saves to RecordSyncEvent. It makes
|
|
|
// 20090730_M - Moved persistent state aux saves to RecordSyncEvent. It makes
|
|
|
// sense for the persistent state to match the latext external record of state
|
|
|
// sense for the persistent state to match the latext external record of state
|
|
|
// info. If SNFServer dies uncerimoneusly that is what we will remember.
|
|
|
// info. If SNFServer dies uncerimoneusly that is what we will remember.
|
|
|
|
|
|
|
|
|
|
|
|
int snfLOGmgr::SecsSinceStartup() {
|
|
|
|
|
|
return (int) difftime(Timestamp(), StartupTime);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
void snfLOGmgr::RecordSyncEvent() { // Sets timestamp of latest Sync. |
|
|
void snfLOGmgr::RecordSyncEvent() { // Sets timestamp of latest Sync. |
|
|
Status.LastSyncTime = Timestamp(); // Set the Sync time.
|
|
|
Status.LastSyncTime = Timestamp(); // Set the Sync time.
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
int snfLOGmgr::SecsSinceLastCondense() { // Gets seconds since latest Condense. |
|
|
int snfLOGmgr::SecsSinceLastCondense() { // Gets seconds since latest Condense. |
|
|
return (int) difftime(Timestamp(), Status.LastCondenseTime); |
|
|
|
|
|
|
|
|
return (int) difftime(Timestamp(), Status.LastCondenseTime);
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Data in the multi-range sliding window is tracked in circular buffers. |
|
|
// Data in the multi-range sliding window is tracked in circular buffers. |