Fix compilation error by casting int to time.Duration