Import nanos into Java sql. Timestamp
•
Java
http://docs.oracle.com/javase/6/docs/api/java/sql/Timestamp.html
The only ctor that doesn't belittle needs millis Is there any way to require 'now' to include nano
Solution
As pointed out in the comments on other answers, system Nanotime () does not actually return any meaningful value about time, in nanoseconds
I want to point out this discussion from so, which points out why we can't get better accuracy in time measurement This seems to mean that you can't follow your requirements, and due to portability and platform limitations, trying to include this capability will violate some java design goals
So when I answer your question, I will say no, but only based on the answers of more people than me
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码