Function 2

Implemented second required function for the assignment (custom clock).