How To Get a Time From Arduino.

Hi

I have a question, how to get a time from arduino.
Board:Arduino Uno R3 Timer:SD2405

I want to get the time Like this: when I press the button, I can get a time like 15:20:20.8642.

Now, I can get the time 15:20:20, but I do not knwo how to get the 0.8642.
Anybody knows how to do it?
Thanks

(deleted)

Maybe you can count millis from each change in the clocks seconds and add that to the time.

The clock module only provides the time in units of seconds, so it cannot provide a reading down to 1/10000th of a second.

You could set the period interrupt to once per second and start a counter, but how much precision you would get in the 100uS region I would not know.

Thanks all of you!

I will go to find a new solution way!

If the clock is only accurate to 1 second, you would have to poll it multiple times until you see the second change, and then use millis(). But millis() isn't accurate, so youd have to calibrate your code by watching the clock for several seconds during setup() to find out exactly how many arduino millis() are in a real-time second.