/// <summary> /// Creates a new <see cref="TimestampDelta"/> from the given /// count of nanoseconds. /// </summary> /// <param name="nanoseconds"> /// The number of nanoseconds. /// </param> /// <returns> /// A new <see cref="TimestampDelta"/>. /// </returns> public static TimestampDelta FromNanoseconds(double nanoseconds) { return(new TimestampDelta(DoubleUtils.ClampToInt64(nanoseconds))); }
/// <summary> /// Creates a new <see cref="TimestampDelta"/> from the given /// count of seconds. /// </summary> /// <param name="seconds"> /// The number of seconds. /// </param> /// <returns> /// A new <see cref="TimestampDelta"/>. /// </returns> public static TimestampDelta FromSeconds(double seconds) { return(new TimestampDelta(DoubleUtils.ClampToInt64(seconds * 1000000000))); }
/// <summary> /// Gets a <see cref="Timestamp"/> from the given /// quantity of milliseconds. /// </summary> /// <param name="milliseconds"> /// The value in milliseconds. /// </param> /// <returns> /// The <see cref="Timestamp"/>. /// </returns> public static Timestamp FromMilliseconds(double milliseconds) { return(new Timestamp(DoubleUtils.ClampToInt64(milliseconds * 1000000))); }