An atomic sense of time