Addition to #5.
The conditional for duration was pushing it back to 2000ms when below 1000ms.
Users might want more control over the duration (Personal thought, 1000ms was still slow for me).
Adjusted the conditional statement, fixing the control over the duration.
Adjusted the lower limit from the duration from 1000ms to 100ms.
Added more documentation for the parameter duration.
Addition to #5. The conditional for duration was pushing it back to 2000ms when below 1000ms. Users might want more control over the duration (Personal thought, 1000ms was still slow for me).