public static bool TryParse(string str, out TIME ret) { uint milliseconds = 0; if (PlcOpenTimeConverter.TryParseToMilliseconds(str, out milliseconds)) { ret = new TIME(milliseconds); return(true); } ret = null; return(false); }
public static TimeSpan ValueToTime(uint timeValue) => PlcOpenTimeConverter.MillisecondsToTimeSpan(timeValue);
public static long TimeToValue(TimeSpan time) => ((long)PlcOpenTimeConverter.ToMilliseconds(time));
public static TimeSpan ToTimeSpan(uint ticks) => PlcOpenTimeConverter.MillisecondsToTimeSpan(ticks);
internal static uint ToTicks(TimeSpan span) => PlcOpenTimeConverter.ToMilliseconds(span);
internal static string ToString(uint ticks) => ToString(PlcOpenTimeConverter.MillisecondsToTimeSpan(ticks));
public override string ToString() => PlcOpenTimeConverter.MillisecondsToString(base.internalTimeValue);
public TIME(int days, int hours, int minutes, int seconds, int milliseconds) { base.internalTimeValue = PlcOpenTimeConverter.ToMilliseconds(new TimeSpan(days, hours, minutes, seconds, milliseconds)); }
public TIME(int seconds, int milliseconds) { base.internalTimeValue = PlcOpenTimeConverter.ToMilliseconds(new TimeSpan(0, 0, seconds, milliseconds)); }
public static TimeSpan ValueToTime(ulong nanoseconds) => PlcOpenTimeConverter.NanosecondsToTimeSpan(nanoseconds);
public static ulong TimeToValue(TimeSpan time) => PlcOpenTimeConverter.ToNanoseconds(time);