Got it. Thanks.

Eric
On Wed, Oct 11, 2017 at 6:37 PM Kenneth Knowles <[email protected]> wrote:

> Hello!
>
> When you say `timer.align(standardMinutes(1)).setRelative()` the timer
> will be set to the next minute boundary after the current time, just as you
> describe. It will only be set once, so you don't need to cancel it, but you
> will need to set it again in your @OnTimer if you want it to repeat.
>
> Kenn
>
> On Wed, Oct 11, 2017 at 6:04 PM, Yihua Fang <[email protected]>
> wrote:
>
>> What does timer.align do and what is the difference between align and
>> offset?  The comment says: "Aligns the target timestamp used by {@link
>> #setRelative()} to the next boundary of {@code period}".
>>
>> For example, if we say
>> `timer.align(Duration.standardMinutes(1)).setRelative()`,  does the timer
>> set to the next minutes like from 10:35:32 to 10:36:00? (HH::MM:SS) Also,
>> does align cause the timer to fire off at every edge or just once? If at
>> every edge, then how can we cancel the timer?
>>
>> Thanks
>> Eric
>>
>
>

Reply via email to