Get file mtime with millisecond resolution from Java
问题 When I read the mtime of a file from Java using Files.getLastModifiedTime , the return value is truncated to whole seconds. I know this works on other systems to get mtimes with millisecond resolution, so what could be different about mine? Here is a complete standalone test which compiles and runs: import java.nio.file.attribute.FileTime; import java.nio.file.Files; import java.nio.file.Paths; public class Test { public static void main(String[] args) throws java.io.IOException { FileTime