public void schedule(TimerTask task, long delay, long period)
Isn’t it possible to use this interface? Calculate the number of milliseconds from the current time to 12 noondelay,period是今天中午12点至明天中午12点就是24小时的毫秒数。这样如果当前时间超过12点了。那delayand it will be the next 12 o'clock.
Isn’t it possible to use this interface? Calculate the number of milliseconds from the current time to 12 noon
delay
,period
是今天中午12点至明天中午12点就是24小时的毫秒数。这样如果当前时间超过12点了。那delay
and it will be the next 12 o'clock.Can you add a method to judge whether the current time is not equal to the scheduled time and not start it? I have never done this...