A mathematical model for the atomic clock error