Added timing function in utility.c