private DateTime Date(long n) { return(EpochStart.Add(TimeSpan.FromSeconds(n))); }
/// <summary> /// Called when [epoch start]. /// </summary> /// <param name="epoch">The epoch.</param> protected void OnEpochStart(int epoch) { EpochStart?.Invoke(this, new EpochStartEventArgs(epoch)); }
/// <summary> /// Convert from a timestamp to a <see cref="DateTime"/>. /// </summary> /// <param name="timestamp"> /// The timestamp to convert. /// </param> /// <returns> /// The <see cref="DateTime"/> representing the same date and time. /// </returns> public static DateTime ToDateTime(double timestamp) { return(EpochStart.AddSeconds(timestamp)); }