"use strict"; let timer; const DELAY_MS = 1000; function handleRequest(request, response) { response.processAsync(); timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); timer.init( () => { response.setHeader("Content-Type", "text/html", false); response.write( "Slow loading page for netmonitor test. You should never see this." ); response.finish(); }, DELAY_MS, Ci.nsITimer.TYPE_ONE_SHOT ); }