Geometric treatment of the gravitomagnetic clock effect