Fix crash when not providing the 'time argument'

Added a 'defaultTime' variable so if no time is provided it defaults to this value (in seconds)