<div dir="ltr">Hi,<div><br></div><div style>I'm reading that I can't use timer in daemon because daemon core is based on thread. So I'm trying to create another thread which simulate timer. My interval is quite big (~1-5 minutes), so I can't just use sleep(60000) because daemon will hung on terminate. So I have two ideas:</div>
<div style><br></div><div style>1. Create loop with short sleep(1000) which on each loop check if main interval occur and check if daemon is terminated</div><div style>2. Create loop with RTL event with RtlEventWaitFor(Event, 60000) and daemon on terminate just send event to worker so it immediately exit.</div>
<div style><br></div><div style>What is the best efficient solution? Maybe exists another way?</div><div style><br></div><div style>Regards.</div></div>