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)); }
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); }