std.datetime.date.DateTimeException if the given duration is negative or if it's greater than or equal to one second.
import core.time : Duration, msecs, hnsecs, nsecs; import std.datetime.date : DateTime; auto st = SysTime(DateTime(1982, 4, 1, 20, 59, 22)); assert(st.fracSecs == Duration.zero); st.fracSecs = msecs(213); assert(st.fracSecs == msecs(213)); st.fracSecs = hnsecs(1234567); assert(st.fracSecs == hnsecs(1234567)); // SysTime has a precision of hnsecs (100 ns), so nsecs are // going to be truncated. st.fracSecs = nsecs(123456789); assert(st.fracSecs == hnsecs(1234567));
Fractional seconds past the second (i.e. the portion of a SysTime which is less than a second).