Author: ygrego Date: 2015-03-19 13:23:03 +0000 (Thu, 19 Mar 2015) New Revision: 959 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/959 Log: Use a method "timeout" instead of javascript method "setTimeout". The code associated with this "setTimeout" have been moved to method "afterTimeOver". Modified: oipf/js/test/Test.js Modified: oipf/js/test/Test.js =================================================================== --- oipf/js/test/Test.js 2015-03-19 13:08:38 UTC (rev 958) +++ oipf/js/test/Test.js 2015-03-19 13:23:03 UTC (rev 959) @@ -135,8 +135,8 @@ document.getElementById(currentTest["method"] + "Result").style.backgroundColor = "red"; document.getElementById(currentTest["method"] + "Duration").textContent = (timeEnd - timeStart).toFixed(2) + " ms"; }); - - setTimeout(function() { + + var afterTimeOver = function() { if (!result) { try { var message = "Any result have been return."; @@ -150,7 +150,10 @@ console.groupEnd(currentTest["label"]); } } - }, 10000); + }; + + timeout(5000) + .then(afterTimeOver.bind(afterTimeOver)); }
participants (1)
-
ygregoï¼ users.nuiton.org