Allow to change the function used for the sleep between slide changes to...

... allow drawing a progress bar

Fixes Issue #1180