Search completed in 0.96 seconds.
nsITimer
method overview void cancel(); void init(in nsiobserver aobserver, in unsigned long adelay, in unsigned long atype); void initwithcallback(in nsitimercallback acallback, in unsigned long adelay, in unsigned long atype); void initwithfunccallback(in
nstimercallbackfunc acallback, in voidptr aclosure, in unsigned long adelay, in unsigned long atype); native code only!
... void initwithfunccallback( in
nstimercallbackfunc acallback, in voidptr aclosure, in unsigned long adelay, in unsigned long atype ); parameters acallback a
nstimercallbackfunc interface compatible function to call when timer fires.
... event every 10 seconds: var event = { observe: function(subject, topic, data) { dump("hello world\n"); } } var timer = components.classes["@mozilla.org/timer;1"].createinstance(components.interfaces.nsitimer); const type_repeating_precise_can_skip = components.interfaces.nsitimer.type_repeating_precise_can_skip; timer.init(event, 10*1000, type_repeating_precise_can_skip); see also
nstimercallbackfunc nsitimercallback ...