Added an optional time value for waiting between changing slides