There is a CmoTime variable in which 0 is constantly being generated, although it should not seem to be CmoTime = TimeGenerator(true, OrderInterval, Precision); (For example, with such numbers OrderInterval = 0.06, Precision = 0.01). And here is TimeGenerator itself (Interval = 0.01, Precition (Tochnost) = 100)
private double TimeGenerator(bool FirstOrder, double Tochnost, double Interval) { double NewTime; int GenerationInterval = (int)(Interval * Precition(Tochnost) + 1); // только если это не первая заявка if (!FirstOrder) { // исключение генерации нуля => повторяющееся время do { NewTime = (double)(rand.Next() % GenerationInterval) / Precition(Tochnost); } while (NewTime == 0); } else NewTime = (double)(rand.Next() % GenerationInterval) / Precition(Tochnost); return Math.Round(NewTime, ChisloZnakov(Tochnost)); }
Precitionfunction? - Igor