Connecting Timer to phones System Time
I want to connect my Timer element to the phones system time
How can i do that?
Timer element is designed to fire an event after some period of time. It`s not connected to system time.
Yup Im trying to fire an event on my timer element and i want to keep it running even if the application is not in use or exit.
That why i want to connect it to system time.
Do you know how to do that? Timer still running even the application is not running, Im trying to apply this in a game
When appication quits your timer will be stopped. So it wouldn
t be possible to fire an events, while application is not running. You can save time when application exits, and when it is started again, you can calculate how much time it wasnt running. But this easily can be hacked by changing system time.
If you want something to fire up events while your application is not running you need something like Cron.
Applications can not be triggered by timers if they are not running. That goes for every application, even cron. If cron is not running, cronjobs will not be started. If the windows service responsible for starting executables is not running, those executables will not be executed.
I meant that application could register to something like cron. Cron ( for example ) can start application over periods of time to do it`s job.