Hi Felix,

On 5/29/13 9:52 PM, "Felix Meschberger" <[email protected]> wrote:

>Hi
>
>Am 29.05.2013 um 20:54 schrieb <[email protected]>
><[email protected]>:
>
>> +    /** SLING-2892: remember the value of the heartbeat this instance
>>has written the last time **/
>> +    private Calendar lastHeartbeatWritten = null;
>
>Is there a reason you use Calendar here ? I have the impression that a
>long being System.currentTimeMillis would be sufficient.

I've chosen to use Calendar for the 'lastHeartbeat' (instead of a long) to
have a human readable value. That's basically why then this new field also
got the type Calendar, as I simply cache the last 'lastHeartbeat' value.
It could of course just cache the long value of the Calendar, agreed.

Cheers,
Stefan

Reply via email to