Constructing a micro/nano second Timestamp
807591Jun 8 2008 — edited Jun 16 2008Hi,
I was looking at how Java can manage Time with a precision of micro/nano seconds, and
I found my self with a big problem:
What I found:
(1) Use java.sql.Timestamp
(2) Construct a value with valueOf with the javadoc explained format
(3) Obtain and process micros/nanos with get/set Nanos
What I'm missing:
How can I construct a Timestamp with microseconds, I mean
I want to obtain from java all the data needed to construct my
timestamp with micro/nano precision.
As I understand System.nanoSeconds() does not fit this case.
Any help will be greatly welcomed.
thanks in advance
-tonioc