Only send one GET per second. This code is awful -- it's hard
to see that this is just a for loop (the same as the last slide);
and it wouldn't work if the calls to GET were coming from different
parts of the program.
var gCounter = 0; function runNext() { if (gCounter < 10) { setTimeout(function() { $.get('services/time', log); runNext(); }, 1000); gCounter++; } } runNext();