Add time function.