summaryrefslogtreecommitdiffstats
path: root/dom/base/test/slow.sjs
blob: 7139eb91f3cf5d62be9ff4642faa7bc7a55d2636 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function handleRequest(request, response) {
  response.processAsync();

  timer = Components.classes["@mozilla.org/timer;1"].createInstance(
    Components.interfaces.nsITimer
  );
  timer.init(
    function () {
      response.write("Here the content. But slowly.");
      response.finish();
    },
    5000,
    Components.interfaces.nsITimer.TYPE_ONE_SHOT
  );
}