Refactoring util functions
Refactoring, clock in C-Code