I need the number of ticks for a file's modification date.
module test;
import std.datetime;
import std.file;
import std.stdio;
void main()
{
auto res1 = TickDuration(timeLastModified(test.d)); // NG
auto res2 = TickDuration.from!hnsecs(timeLastModified(test.d).stdTime);
On Wednesday, November 23, 2011 00:24:13 Andrej Mitrovic wrote:
I need the number of ticks for a file's modification date.
module test;
import std.datetime;
import std.file;
import std.stdio;
void main()
{
auto res1 = TickDuration(timeLastModified(test.d)); // NG
auto res2 =
I'm trying to port some Tango D1 code to D2, I don't know why ticks
are used, but this was the code:
timeModified = Path.modified(path).ticks;
It fetches the modification date of a file and apparently converts
that to ticks. I've tried using Phobos' std.file.timeLastModified
which returns a
On Wednesday, November 23, 2011 01:01:54 Andrej Mitrovic wrote:
I'm trying to port some Tango D1 code to D2, I don't know why ticks
are used, but this was the code:
timeModified = Path.modified(path).ticks;
It fetches the modification date of a file and apparently converts
that to ticks.
Yeah, Tango doesn't really say much except
Get the number of ticks that this timespan represents.:
http://www.dsource.org/projects/tango/docs/stable/tango.time.Time.html#TimeSpan.ticks
I'll have to install Tango to test the code. Anyway thanks for your help!
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;
On Wednesday, November 23, 2011 03:12:25 Andrej Mitrovic wrote:
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;