Working on clock function.