Convert SysTime to TickDuration?

Andrej Mitrovic andrej.mitrovich at gmail.com
Tue Nov 22 18:12:25 PST 2011


Interesting, it might just be stdTime like you've said. I do get a
slightly different reading though:

D2 Phobos:
import std.stdio;
import std.file;
void main()
{
    auto x = timeLastModified(`c:\test.d`).stdTime;
    writeln(x);
}

D1 Tango:
import Path = tango.io.Path;
import tango.io.Stdout;
void main()
{
    char[] path = `c:\test.d`;
    auto val = Path.modified(path).ticks;
    Stdout(val);
}

Phobos prints: 634576105879530000
Tango prints:   634576105879531250

It almost seems like Tango has more accuracy. Well in any case, this
should work.


More information about the Digitalmars-d-learn mailing list