clock: Fix frame rate detection when app stalls, add test. See #71