jQuery in Action, 3rd edition
The moose likes Beginning Java and the fly likes Nano Timer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Nano Timer" Watch "Nano Timer" New topic

Nano Timer

Tom Hill
Ranch Hand

Joined: Aug 24, 2003
Posts: 115
Hi guys, I hope you can help:
Im developing in java 1.4.2 is there a mechanism to get the current time in Nano seconds rather than just milliseconds?
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

System.nanoTime() - since 1.5. Doesn't sound too reliable though.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Michael Lloyd Lee

Joined: Sep 07, 2005
Posts: 22
not without JNI or upgrading to 1.5.

Please please please use code tags!<br /> <br /><a href="http://java.sun.com/j2se/1.5.0/docs/api/" target="_blank" rel="nofollow">Java API</a> - <a href="http://java.sun.com/docs/books/tutorial/index.html" target="_blank" rel="nofollow">Java Tutorials</a>
I agree. Here's the link: http://aspose.com/file-tools
subject: Nano Timer
jQuery in Action, 3rd edition