# millis() in a millisecond stopwatch

I'm making a stopwatch that will measure time between two points.

I want that stopwatch to have a millisecond accuracy.

After the start when someone touch the pad it will show like the time of the touch (15.359) 15 seconds and 359 millis.

I have an arduino uno board. Everywhere I read it says that millis its not reliable, and in a feel tests it seems not very accurate. Also a lot of places say to use a RTC, but every RTC I found and read about it seem to use only second and not milliseconds. Others say to use a 32 KHz crystal, but I'm not sure if it will fix this. Could anyone give some ideas?

The Arduino will only record time, only that, start and get time and subtract and write on the serial and end.

Thanks! update 1: thanks Mattia for the edit.

update2 : I was making some math, and if the device is on for 8 hours, and i want millisecond precision i need something like 30ppb right? Would this do the job? http://www.digikey.com/product-detail/en/abracon-llc/AOCJYR-12.800MHZ-M5649LF/535-12624-1-ND/4989030

• Use a precision oscillator (possibly temperature compensated), then measure its time. You can find even 5ppm oscillators, which means that you can have an accuracy of one millisecond for times less than 200 seconds.. Commented May 13, 2016 at 13:18
• Some RTC can also output a frequency. E.g. the DS3231 can output a 1Hz, 1.024kHz, 4.096kHz, 8.192kHz square wave. This frequency is quite precise, as it's temperature compensated. You could use it, and count the number of pulses between the two touches. Might I ask what you are using to detect a touch? I hope you are not using CapSense for this. Commented May 13, 2016 at 13:40
• Theres a touchpad, that when someone touch theres a contact similar to a button, i just read LOW or HIGH on arduino to know if someone touchs it. I'll read about count the pulses. thanks Commented May 13, 2016 at 13:47
• For a ms in 8 hours, I get ~ 1 part in 30 million: (8hrs * 3600 sec/hr * 1000 ms/sec = 28,800,00 ms). Commented May 13, 2016 at 20:27
• Yes! 28,800,800! But i have to multiply over the 20/1.000.000.000 in this case from the crystal right? to know the precision? because i dont found any 1/30ppm crystal, neither 0.33ppm. I'm probably messing up everything, first time working with this math. Commented May 13, 2016 at 21:14