Add time function and clock struct usage