Added duration setting

Added duration setting