mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 18:08:58 +00:00
8219a5c503
Differential Revision: https://phabricator.services.mozilla.com/D177025
17 lines
440 B
JavaScript
17 lines
440 B
JavaScript
var timer = null;
|
|
|
|
function handleRequest(request, response) {
|
|
response.processAsync();
|
|
timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
|
timer.initWithCallback(
|
|
function () {
|
|
response.setStatusLine(null, 200, "OK");
|
|
response.setHeader("Content-Type", "text/plain", false);
|
|
response.write("hello");
|
|
response.finish();
|
|
},
|
|
30000 /* milliseconds */,
|
|
Ci.nsITimer.TYPE_ONE_SHOT
|
|
);
|
|
}
|