Display loader after an optionnal delay

It prevent loader flicks when the display duration is very short by delaying the displaying and cancelling delay if hide during this delay
So if the previous message is still waiting to be displayed, the next message won't be displayed at all (since you return on line 17)?