Check sooner and only assert if duration hasn't passed
Merge branch 'master' of github.com:openlayers/ol3 into wmscaps