Add startup delay for security discovery
This commit is contained in:
1 parent
10e174c5b4
commit
37f595ed9a
5 files changed
+71
-2
No files matched your search
@@ -1,5 +1,6 @@
|
||||
#include "datetime.h"
|
||||
|
||||
|
||||
#include "bts_assert.h"
|
||||
#include "TimeStamp.h"
|
||||
|
||||
@@ -317,6 +318,26 @@ Date ll_to_date(LLDateTime time) {
|
||||
return date;
|
||||
}
|
||||
|
||||
|
||||
bool is_local_time_sunday() {
|
||||
auto now = local_now();
|
||||
return now.date().day_of_week() == boost::date_time::Sunday;
|
||||
}
|
||||
bool is_local_time_between(int hh_start, int mm_start, int hh_end, int mm_end) {
|
||||
auto now = local_now();
|
||||
auto hh_now = now.time_of_day().hours();
|
||||
auto mm_now = now.time_of_day().minutes();
|
||||
|
||||
if (hh_now > hh_start && hh_now < hh_end) return true;
|
||||
if (hh_now == hh_start || hh_now == hh_end) {
|
||||
if (mm_now >= mm_start && mm_now <= mm_end) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
struct UtcTimeStamp {
|
||||
int hour;
|
||||
int min;
|
||||
|
||||
Reference in new issue
Block a user