I know there are some questions about this topic but none of these helped me to find a solution.
I've got two Timeline
Animations, I want to execute them after a delay of a few seconds. I'm gonna show you an example:
Every time I click my mouse, the Animation shall reset to its default delay time, let's say 5 seconds. If I'll do nothing the time's running away until it's zero. And when I reach the 0 seconds, the Animation has to start()
. And so on.
Of course Thread.sleep()
would make my UI freeze until the mission is done.
And I don't know whether I should use Thread
, Task
or other classes because the work is not that complex.
There are a bunch of ways to do it, but I'm not experienced in multithreading and I wanna learn to make it efficiently. Thank you guys a lot.