std/time

Time: points in time (Instant), the spans between them (Duration), points on the wall clock (Timestamp), and Clock, which reads both clocks of the machine. The calendar is Date, a day of the proleptic Gregorian years 0000 to 9999, and Weekday; Timestamp.parse and Date.parse read RFC 3339 text and fail with a TimeParseError. The wall clock without a zone database is TimeOfDay, DateTime (a date and a time, no offset), UtcOffset (a fixed offset in whole seconds) and OffsetDateTime (a DateTime with its offset, so an instant that remembers how it was written); named zones and daylight saving are not here.

The three values are a count of nanoseconds in an Int64 and nothing else, so they cost what the number costs: comparing and subtracting them is integer arithmetic, and only reading a clock goes to the operating system. They are in the prelude and reach nothing; Clock and sleep are the capability, and an import of them is what says a file reads the time. Date, Weekday and TimeParseError read nothing either, and are an import because a name like Date in every file would clash with the types of the program.

Modules

Everything