Clock

Exposes UTC time relative to Jan 1st, 1 AD. These values are based upon a clock-tick of 100ns, giving them a span of greater than 10,000 years. These units of time are the foundation of most time and date functionality in Tango.

Interval is another type of time period, used for measuring a much shorter duration; typically used for timeout periods and for high-resolution timers. These intervals are measured in units of 1 second, and support fractional units (0.001 = 1ms).

Members

Properties

now
Time now [@property getter]

Return the current time as UTC since the epoch

now
Time now [@property getter]

Return the current time as UTC since the epoch

Static functions

convert
Time convert(const(FILETIME) time)

Convert FILETIME to a Time

convert
FILETIME convert(const(Time) dt)

Convert Time to a FILETIME

convert
Time convert(const(timeval) tv)

Convert timeval to a Time

convert
timeval convert(const(Time) time)

Convert Time to a timeval

fromDate
Time fromDate(const(DateTime) dt)

Convert Date fields to Time

fromDate
Time fromDate(const(DateTime) dt)

Convert Date fields to Time

setDoy
void setDoy(DateTime dt)
Undocumented in source. Be warned that the author may not have intended to support it.
toDate
DateTime toDate()

Set Date fields to represent the current time.

toDate
DateTime toDate(const(Time) time)

Set fields to represent the provided UTC time. Note that the conversion is limited by the underlying OS, and will fail to operate correctly with Time values beyond the domain. On Win32 the earliest representable date is 1601. On linux it is 1970. Both systems have limitations upon future dates also. Date is limited to millisecond accuracy at best.

toDate
DateTime toDate()

Set Date fields to represent the current time.

toDate
DateTime toDate(const(Time) time)

Set fields to represent the provided UTC time. Note that the conversion is limited by the underlying OS, and will fail to operate correctly with Time values beyond the domain. On Win32 the earliest representable date is 1601. On linux it is 1970. Both systems have limitations upon future dates also. Date is limited to millisecond accuracy at best.

Static variables

DaysToMonthCommon
uint[] DaysToMonthCommon;
Undocumented in source.

Meta