Вот вариант с "обязательным" разнесением скриптов...
<!DOCTYPE html>
<html>
<head>
<script src='http://code.jquery.com/jquery-latest.js'></script>
<!--
<script src="https://code.angularjs.org/1.3.9/angular.min.js"></script>
<script src="https://code.angularjs.org/1.3.9/angular-route.js"></script>
<link rel='stylesheet type=text/css href=tmp.css' />
-->
<style type='text/css'>
</style>
<script type='text/javascript'>
var timeout=500;
function test(){
var o=$('#inc');
o.text(+o.text()+1);
setTimeout(test,timeout);
};
$(function (){
setTimeout(test,timeout);
})
</script>
</head>
<body>
<div id='inc'></div>
<button>Test</button>
<script type='text/javascript'>
$('button').click(function(){
timeout=1000;
});
</script>
</body>
</html>