SysTime comparesin - dropMiliseconds

User user at dlang.org
Sun Aug 12 20:51:33 UTC 2018


On Sunday, 12 August 2018 at 19:50:44 UTC, User wrote:
> I have to synchronize a directory. If remote file is newer I 
> copy to local. If local file is newer I copy it to remote 
> server. For some reason remote timestamp does not contain 
> milliseconds, so comparison (localFileTime < remoteFileTime, 
> etc) fails. I need help to drop milliseconds from local file 
> timestamp.

auto m = dur!("seconds")(1);
if ((remote - local) > m)


More information about the Digitalmars-d-learn mailing list