Beispiel #1
0
        /// <summary>
        /// Creates a new time object with the specified time
        /// </summary>
        /// <param name="value">the amount of time</param>
        /// <param name="type">the time measuring type</param>
        public Time(T value, ID.TimeType type)
        {
            if (!(typeof(T) == typeof(int) || typeof(T) == typeof(short) || typeof(T) == typeof(long)))
            {
                throw new ArgumentException("Time only supports the types int, short and long");
            }

            Value = value;
            Type  = type;
            _     = GetAsTicks();
        }
Beispiel #2
0
 /// <summary>
 /// Creates a new time object with the specified time
 /// </summary>
 /// <param name="value">the amount of time</param>
 /// <param name="type">the time measuring type</param>
 public NoneNegativeTime(T value, ID.TimeType type) : base(value, type)
 {
 }