public long? GetExpectedEndTime(ContextManagerRealization realization)
 {
     var agentInstanceContext = realization.AgentInstanceContextCreate;
     var current = agentInstanceContext.SchedulingService.Time;
     var msec = TimePeriodCompute.DeltaAdd(current, null, true, agentInstanceContext);
     return current + msec;
 }
 public long AbsExpiry(PatternAgentInstanceContext context)
 {
     var current = context.StatementContext.SchedulingService.Time;
     return current + TimePeriodCompute.DeltaAdd(current, null, true, context.AgentInstanceContext);
 }