Worth putting the defaulting to 'seconds' functionality in the function header to make that more clear? (It was not apparent to me that you had done that until I started writing this comment).