diff --git a/src/common.h b/src/common.h index f97be62..2529dac 100644 --- a/src/common.h +++ b/src/common.h @@ -38,7 +38,7 @@ using namespace std; using namespace std::filesystem; using namespace std::chrono; -#define APP_VER "2.0.t9" +#define APP_VER "2.0.t10" #define APP_NAME "Motion Watch" #define REC_LOG_NAME "rec_log_lines.html" #define DET_LOG_NAME "det_log_lines.html" diff --git a/src/main.cpp b/src/main.cpp index fc7a9d7..ed463e6 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -33,14 +33,10 @@ void eventLoop(shared_t *share) auto event = it->second; auto timeDiff = genEpoch() - event.createTime; - // future time protection. this should never occur but - // this is in place in case the system time is incorrect. - if (timeDiff > 0) + // wait at least 61 seconds before processing the event in + // queue. + if ((timeDiff > 0) && (timeDiff > 60)) { - // wait at least 61 seconds before processing the event in - // queue. - if (timeDiff < 61) sleep(61 - timeDiff); - try { wrOutVod(event, share);