/// <summary>Calculates the specified start.</summary> /// <param name="start">The start.</param> /// <param name="now">The now.</param> /// <param name="end">The end.</param> private void Calculate(DateTime start, DateTime now, DateTime end) { if (start >= end) throw new InvalidOperationException($"Epoch.Calculate: The Start ({start}) of the Epoch must be less than the End ({end})."); Period = end - start; End = end; Start = start; if (now < start) throw new InvalidOperationException($"Epoch.Calculate: The Now ({now}) value must fall inthe range of Start ({start}) and End ({end}) of the Epoch."); Now = now; // Calculate time span remaining Remaining = End - Now; Passed = Now - Start; PassedPC = Convert.ToInt32( Passed.Ticks / (Period.Ticks / 100L ) ); RemainingPC = 100 - PassedPC; }
Trouble logging in? Simply enter your email address OR username in order to reset your password.
For faster and more reliable delivery, add customer-service@submain.com to your trusted senders list in your email software.