Exemplo n.º 1
0
        public PrimitiveEventGenerator(int eventCount, TimeUnit timeUnit, EventType eventName)
        {
            this.eventCount = eventCount;
            this.eventName  = eventName;

            //this.rate = timeUnit.GetIntervalFromCountPerUnit(eventCount);
            timeArray  = new double[eventCount];
            intervalMS = (long)timeUnit.GetTimeSpanFromDuration(1).TotalMilliseconds;
        }
Exemplo n.º 2
0
 public static TimeSpan GetIntervalFromCountPerUnit(this TimeUnit timeUnit, int eventCount)
 {
     return(timeUnit.GetTimeSpanFromDuration(1.0 / eventCount));
 }