Issue #88: Move clock implementation from C to python