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

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

            process();

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