Fixed possible zero division during ZC timestamp calculation