Testing timer events in processes

Hi Cristian,

you can use the ClockUtil class.
For example to increment the time with the seconds of ten days use:

long time = ClockUtil.getCurrentTime().getTime();
long seconds = 10 *  24 * 60 * 60;
ClockUtil.setCurrentTime(new Date(time + seconds * 1000));

Greets,
Chris

3 Likes