using System; namespace JobsJobsJobs.Shared { /// /// Milliseconds past the epoch (JavaScript's date storage format) /// public record Milliseconds(long Millis) { /// /// Get the milliseconds value for now /// /// A new milliseconds from the time now public static Milliseconds Now() => new Milliseconds( (DateTime.UtcNow.Ticks - new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).Ticks) / 10000L); } }