MCPcopy Create free account
hub / github.com/OpenArkStudio/ARK / TestCronScheduler

Method TestCronScheduler

samples/sample1/Sample1Module.cpp:87–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87void Sample1Module::TestCronScheduler()
88{
89 static AFScheduler scheduler;
90 AFDateTime* now = ARK_NEW AFDateTime();
91
92 scheduler.cron("* * * * *", [now]() {
93 AFDateTime cur;
94 AFDateTime::TimeDiff diff = (cur - *now);
95
96 std::cout << diff << std::endl;
97 *now = cur;
98 });
99}
100
101void Sample1Module::TimerTest(uint64_t timer_id, const AFGUID& entity_id)
102{

Callers

nothing calls this directly

Calls 2

AFDateTimeClass · 0.85
cronMethod · 0.80

Tested by

no test coverage detected