public void SetTimeSource(TimeSource source) { if (source != time_source) { ChangeParameter(() => time_source = source); } }
public StepStopwatch(long m, TimeSource t) { timer = new Stopwatch(t); elapsed_time_in_milliseconds = 0; max_step_in_milliseconds = m; }
static public long TimeProcessInMilliseconds(this TimeSource item, Process process) { long start_time = item.GetCurrentTimeInMilliseconds(); process(); return(item.GetCurrentTimeInMilliseconds() - start_time); }
public void SetTimeSource(TimeSource source) { timer.SetTimeSource(source); }
public StepStopwatch(Duration d, TimeSource t) : this(d.GetWholeMilliseconds(), t) { }
public Worker_SimpleAmortize(long i, Process <T> p, TimeSource t) : base(i, p, t) { frame_timer = new Stopwatch(t); }
public ConductorOrder_WaitFor(long d, TimeSource t) : this(new Timer(d, t)) { }
public Stopwatch(TimeSource t, float s) { speed = s; time_source = t; }
public Timer(TimeSource t) : this(0, t) { }
public Timer(Duration d, TimeSource t) : this(d.GetWholeMilliseconds(), t) { }
static public bool Add <T>(this DecayTimeSet <T> item, T to_add, Duration duration, TimeSource time_source, bool recharge) { return(item.Add(to_add, () => new Timer(duration, time_source), recharge)); }
static public ConductorOrder Order_WaitFor <T>(this ConductedValue <T> item, Duration duration, TimeSource time_source) { return(new ConductorOrder_WaitFor(duration, time_source)); }
public Delay(long d, TimeSource t) { can_fire = false; timer = new Timer(d, t); }
static public Duration GetCurrentTime(this TimeSource item) { return(Duration.Milliseconds(item.GetCurrentTimeInMilliseconds())); }
public Worker(long i, Process <T> p, TimeSource t) { timer = new Timer(i, t).StartExpireAndGet(); work_collection = new WorkCollection <T>(p); }
public Worker(Duration i, Process <T> p, TimeSource t) : this(i.GetWholeMilliseconds(), p, t) { }
public Timer(long d, TimeSource t) : base(t) { SetDurationInMilliseconds(d); }
public Stopwatch(TimeSource t) : this(t, 1.0f) { }
public TemporalEvent_Duration(Duration d, TimeSource t) : this(new Timer(d, t)) { }
public LogTimer(TimeSource t) { timer = new Stopwatch(t); times_in_milliseconds = new List <long>(); }
public TimedValue(T v, long d, TimeSource t) { value = v; timer = new Timer(d, t).StartAndGet(); }
static public float GetCurrentTimeInSeconds(this TimeSource item) { return(item.GetCurrentTime().GetSeconds()); }
public TimedValue(T v, Duration d, TimeSource t) : this(v, d.GetWholeMilliseconds(), t) { }
public ConductorOrder_WaitFor(Duration d, TimeSource t) : this(new Timer(d, t)) { }
public TemporalOperationCache(string i, Operation <T, P1, P2, P3, P4, P5> o, Duration d, TimeSource t) : this(i, o, new Timer(d, t)) { }