Added time() function to utils for measuring performance