import core.time : msecs, usecs, hnsecs, nsecs; import std.datetime.date : DateTime; auto dt = DateTime(1982, 4, 1, 20, 59, 22); assert(SysTime(dt, msecs(213)).fracSecs == msecs(213)); assert(SysTime(dt, usecs(5202)).fracSecs == usecs(5202)); assert(SysTime(dt, hnsecs(1234567)).fracSecs == hnsecs(1234567)); // SysTime and Duration both have a precision of hnsecs (100 ns), // so nsecs are going to be truncated. assert(SysTime(dt, nsecs(123456789)).fracSecs == nsecs(123456700));
Fractional seconds past the second (i.e. the portion of a SysTime which is less than a second).