예제 #1
0
 public void AddFibre(string name, float timeSliceMs, FibreFactory factory)
 {
     if (budget.TryGetValue(name, out var value))
     {
         timeSliceMs = value;
     }
     Fibres.Add(new Fibre(name, timeSliceMs, factory));
 }
예제 #2
0
 public Fibre(string name, float timeslice, FibreFactory factory)
 {
     Name         = name;
     this.factory = factory;
     Restart();
     timeSliceTicks        = (int)(timeslice * (float)MS_TO_TICKS);
     maxSlicePerFrameTicks = (int)(timeslice * (float)MS_TO_TICKS);
 }