modified core.py

global name clock is not defined