nsISupports
Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0)void registerTimer(in AString id, in nsITimerCallback callback, in unsigned long interval); |
Presents a user interface that checks for and displays the available updates.
void registerTimer( in AString id, in nsITimerCallback callback, in unsigned long interval );
idcallbacknsITimerCallback object that is notified when the interval expires.intervalNote that the timer is not precise, and that the default minimum interval is 2 minutes.
In order to avoid having to instantiate a component to call the registerTimer() method, the component can instead register an update-timer category with comma-separated values as a single string representing the timer, like this:
_xpcom_categories: [{ category: "update-timer",
value: "contractID," +
"method," +
"id," +
"preference," +
"interval" }],
This allows you to schedule the timer without actually having to instantiate the component; instead, the component is instantiated when the timer is triggered.
The values are:
getService or createInstance, depending on your component.registerTimer().registerTimer().