Accessing the Internal RTC (Due - SAM3X8E)

millis() is perfectly accurate for a traffic light. It also doesn't require any external libraries.

If you use millis() then your code can run on any Arduino straight out of the box.