Beispiel #1
0
 public void SetTimeSource(TimeSource source)
 {
     if (source != time_source)
     {
         ChangeParameter(() => time_source = source);
     }
 }
Beispiel #2
0
        public StepStopwatch(long m, TimeSource t)
        {
            timer = new Stopwatch(t);
            elapsed_time_in_milliseconds = 0;

            max_step_in_milliseconds = m;
        }
Beispiel #3
0
        static public long TimeProcessInMilliseconds(this TimeSource item, Process process)
        {
            long start_time = item.GetCurrentTimeInMilliseconds();

            process();

            return(item.GetCurrentTimeInMilliseconds() - start_time);
        }
Beispiel #4
0
 public void SetTimeSource(TimeSource source)
 {
     timer.SetTimeSource(source);
 }
Beispiel #5
0
 public StepStopwatch(Duration d, TimeSource t) : this(d.GetWholeMilliseconds(), t)
 {
 }
Beispiel #6
0
 public Worker_SimpleAmortize(long i, Process <T> p, TimeSource t) : base(i, p, t)
 {
     frame_timer = new Stopwatch(t);
 }
Beispiel #7
0
 public ConductorOrder_WaitFor(long d, TimeSource t) : this(new Timer(d, t))
 {
 }
Beispiel #8
0
 public Stopwatch(TimeSource t, float s)
 {
     speed       = s;
     time_source = t;
 }
Beispiel #9
0
 public Timer(TimeSource t) : this(0, t)
 {
 }
Beispiel #10
0
 public Timer(Duration d, TimeSource t) : this(d.GetWholeMilliseconds(), t)
 {
 }
Beispiel #11
0
 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));
 }
Beispiel #12
0
 static public ConductorOrder Order_WaitFor <T>(this ConductedValue <T> item, Duration duration, TimeSource time_source)
 {
     return(new ConductorOrder_WaitFor(duration, time_source));
 }
Beispiel #13
0
 public Delay(long d, TimeSource t)
 {
     can_fire = false;
     timer    = new Timer(d, t);
 }
Beispiel #14
0
 static public Duration GetCurrentTime(this TimeSource item)
 {
     return(Duration.Milliseconds(item.GetCurrentTimeInMilliseconds()));
 }
Beispiel #15
0
 public Worker(long i, Process <T> p, TimeSource t)
 {
     timer           = new Timer(i, t).StartExpireAndGet();
     work_collection = new WorkCollection <T>(p);
 }
Beispiel #16
0
 public Worker(Duration i, Process <T> p, TimeSource t) : this(i.GetWholeMilliseconds(), p, t)
 {
 }
Beispiel #17
0
 public Timer(long d, TimeSource t) : base(t)
 {
     SetDurationInMilliseconds(d);
 }
Beispiel #18
0
 public Stopwatch(TimeSource t) : this(t, 1.0f)
 {
 }
Beispiel #19
0
 public TemporalEvent_Duration(Duration d, TimeSource t) : this(new Timer(d, t))
 {
 }
Beispiel #20
0
 public LogTimer(TimeSource t)
 {
     timer = new Stopwatch(t);
     times_in_milliseconds = new List <long>();
 }
Beispiel #21
0
 public TimedValue(T v, long d, TimeSource t)
 {
     value = v;
     timer = new Timer(d, t).StartAndGet();
 }
Beispiel #22
0
 static public float GetCurrentTimeInSeconds(this TimeSource item)
 {
     return(item.GetCurrentTime().GetSeconds());
 }
Beispiel #23
0
 public TimedValue(T v, Duration d, TimeSource t) : this(v, d.GetWholeMilliseconds(), t)
 {
 }
Beispiel #24
0
 public ConductorOrder_WaitFor(Duration d, TimeSource t) : this(new Timer(d, t))
 {
 }
Beispiel #25
0
 public TemporalOperationCache(string i, Operation <T, P1, P2, P3, P4, P5> o, Duration d, TimeSource t) : this(i, o, new Timer(d, t))
 {
 }