3600 again if its not been stopped
|
Hello guys,
Can I somehow get the time till a event is executing again?
Let's say I start a new task:
Code:TaskQueue.queue(new Task(3600)
The Task will reexecute in 3600 milli seconds I think, but how can I get the time till reexecute?
All regards, MarkQ
3600 again if its not been stopped
Then show me how to do that? I actually haven't done anything with time stamps.
when task is ran, save current time to variable. then create a method that returns that variable. compare current time and that methods return value. thats how much time has passed!
thats the logic you need, there are methods that you can implement that will do it for you.
Um I'm not quite sure how that works lol
let's say i got this task running:
I want a method that checks the time till next execute;Code:public static void runTimeTask(){ int nextExecute = 3600; TaskQueue.queue(new Task(nextExecute){ @Override public void execute() { //DOING TASK HERE } @Override public void onStop() { } }); }
But I rly don't know how to do that again xD it's the help section not the "hint" section. Please help me.Code:private void getTimeTillNextExecute()
Paste your Task class. How you determine the time until the next execute is going to be based on how you decrement the value passed in the constructor. Im unable to help without this basic information.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |