aspose file tools*
The moose likes Beginning Java and the fly likes Time Conversion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Time Conversion" Watch "Time Conversion" New topic
Author

Time Conversion

Phillipe Rodrigues
Ranch Hand

Joined: Oct 30, 2007
Posts: 165
Hi,
I face problems when specifying the time in milliseconds,nanosecondsfor sleep()

please let me know:
1 second =? milliseconds
1 second =? nanoseconds
1 millisec =? nanoseconds
1 min = ? millisec
1 min =? nanosec


Thanks,
akhilesh pandey
Greenhorn

Joined: Jun 03, 2008
Posts: 17
I think its littl mathematical
milli =ten raise to -3 and
nano=ten raise to-9.

So 1sec=1000 millisec.
and 1 sec=10 raise to 9 nanosec.

Similary you can do the rest all calculations.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38363
    
  23
Originally posted by Phillipe Rodrigues:
please let me know:
1 second = 1000 milliseconds
1 second = 1,000,000,000 nanoseconds
1 millisec = 1,000,000 nanoseconds
1 min = 60*1000 = 60,000 millisec
1 min = 60*1,000,000,000 = 60,000,000,000 nanosec
Using commas as thousand separators in the British and North American custom.

[edit]I presume you are using the TimeUnit enum?[/edit]
[ June 04, 2008: Message edited by: Campbell Ritchie ]
 
Consider Paul's rocket mass heater.
 
subject: Time Conversion