views:

43

answers:

2

I'm looking at using the Quartz scheduler, but I need to be able to use it both in 'live' mode, using the real clock, and 'simulation' mode where I control the simulated clock. Is this possible with Quartz? I couldn't see anything in the docs that suggested it was.

Thanks, Jon

A: 

Looks to me that you need a heart-bit object, which rate you can control, possibly by using system property.

Quartz' SimpleTrigger has a granularity of 1 ms for repeat interval, so, in theory, it can be used to implement the heart-bit object and cover variety of rates.

Just make sure that your system can cope with arrhythmia ( missing heart bits ).

Alexander Pogrebnyak
When in simulation, I need 'time' to replay as fast as possible, so not sure that would work.
Jon
A: 

After further investigation I don't believe what I'm trying to do is possible. There is a TimeBroker interface in Quartz but the documentation states that it is not currently used. Quartz currently always uses the system clock and there is no way to override.

Jon