private long getCurrentTime() { return workingMemory.getSessionClock().getCurrentTime(); } }
private long getCurrentTime() { return workingMemory.getSessionClock().getCurrentTime(); } }
private void applyTimeMachine(ExecutionTrace executionTrace) { ((PseudoClockScheduler) workingMemory.getSessionClock()).advanceTime( getTargetTime( executionTrace ) - getCurrentTime(), TimeUnit.MILLISECONDS ); }
private void applyTimeMachine(ExecutionTrace executionTrace) { ((PseudoClockScheduler) workingMemory.getSessionClock()).advanceTime( getTargetTime( executionTrace ) - getCurrentTime(), TimeUnit.MILLISECONDS ); }
public final InternalFactHandle newFactHandle(final int id, final Object object, final long recency, final ObjectTypeConf conf, final InternalWorkingMemory workingMemory, final WorkingMemoryEntryPoint entryPoint) { if ( conf != null && conf.isEvent() ) { // later we need to centralize the following code snippet in a common method // shared by all fact handle factory implementations TypeDeclaration type = conf.getTypeDeclaration(); long timestamp = workingMemory.getSessionClock().getCurrentTime(); long duration = 0; if ( type.getDurationExtractor() != null ) { duration = type.getDurationExtractor().getLongValue( workingMemory, object ); } return new Jsr94EventFactHandle( id, object, recency, timestamp, duration, entryPoint ); } else { return new Jsr94FactHandle( id, object, recency, entryPoint ); } }
if ( rule.getCalendars() != null ) { long timestamp = workingMemory.getSessionClock().getCurrentTime(); for ( String cal : rule.getCalendars() ) { if ( !workingMemory.getCalendars().get( cal ).isTimeIncluded( timestamp ) ) {
if ( rule.getCalendars() != null ) { long timestamp = workingMemory.getSessionClock().getCurrentTime(); for ( String cal : rule.getCalendars() ) { if ( !workingMemory.getCalendars().get( cal ).isTimeIncluded( timestamp ) ) {