コード例 #1
0
 /// <summary>
 ///   Creates an event that is scheduled with a certain delay after its creation.
 /// </summary>
 /// <param name="env">The <see cref="SimEnvironment"/> this event will belong to.</param>
 /// <param name="delay">The delay at which the timeout event will be scheduled.</param>
 /// <param name="value">The value which will be returned on event success.</param>
 /// <param name="name">The name which can be optionally assigned to this event.</param>
 /// <exception cref="ArgumentOutOfRangeException">
 ///   <paramref name="delay"/> is less than zero, or <paramref name="delay"/> plus
 ///   current time clock is greater than <see cref="double.MaxValue"/>.
 /// </exception>
 internal Timeout(SimEnvironment env, double delay, T value) : base(env)
 {
     _delay = delay;
     _value = value;
     env.ScheduleTimeout(this, _delay);
 }