  | |  | setInterval test results | setInterval test results 2004-02-12 - By Nick Gerig
Back Ok just to confirm that this feature is still supported :(
I did 2 tests, one that initiates setInterval just once (test 1) and the other that does clearInterval when the function is called and then re-initiates setInterval (test 2). (full code listed below and based on Graham and/or Stefan's previous postings).
In all all cases the application instance was still 'alive' when the setInterval died.
host : http://www.influxis.com platform: Windows 2000 Server FCS version : 1.5.1 r124.
test 1 : 121 minutes test 2 : 244 minutes
test 1 : 69 minutes test 2 : 181 minutes
host : http://www.mediatemple.net platform: linux FCS version : 1.5.1
test 1 : 191 minutes test 2 : 240 minutes
test 1 : 15 minutes test 2 : 225 minutes
//test 1 code //-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- application.onAppStart = function (){ log_so=SharedObject.get("logSO",true); log_date=new Date(); log_so.setProperty("start","logging started:"+log_date.getHours()+":"+log_date.getMinutes()); trace("logging started"); setInterval(this.enterLog,60000); };
application.enterLog=function(){ log_date=new Date(); log_so.setProperty("logging","logging:"+log_date.getHours()+":"+log_date .getMinutes()); trace("logging: "+log_date.getHours()+":"+log_date.getMinutes()); }
application.onAppStop=function(){ if (info.code == "Application.GC" ) return false;
log_date=new Date(); trace("app stopped: "+log_date.getHours()+":"+log_date.getMinutes()); log_so.setProperty("lastLog","lastlog:"+log_date.getHours()+":"+log_date .getMinutes()); } //-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- -----
//test 2 code //-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- application.onAppStart = function() { log_so = SharedObject.get("logSO", true); log_date = new Date(); log_so.setProperty("start", "logging started:"+log_date.getHours()+":"+log_date.getMinutes()); trace("logging started"); this.inter = setInterval(this.enterLog, 60000); }; application.enterLog = function() { clearInterval(this.inter); log_date = new Date(); log_so.setProperty("logging", "logging:"+log_date.getHours()+":"+log_date.getMinutes()); trace("logging: "+log_date.getHours()+":"+log_date.getMinutes()); this.inter = setInterval(this.enterLog, 60000); }; application.onAppStop = function() { if (info.code == "Application.GC") return false; log_date = new Date(); trace("app stopped: "+log_date.getHours()+":"+log_date.getMinutes()); log_so.setProperty("lastLog", "lastlog:"+log_date.getHours()+":"+log_date.getMinutes()); };
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Supported by Fig Leaf Software -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Lower Prices for Certified Training! Check out new lower prices for Certified Macromedia Training from Fig Leaf Software. Expand your skill set with courses in ColdFusion, Flash, Rich Internet Applications and .NET in the new year. Fig Leaf Software provides the highest caliber instruction at our training centers in Washington D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location.
Get the details at http://training.figleaf.com/ -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: flashcomm-unsubscribe@(protected) For additional commands, e-mail: flashcomm-help@(protected)
Earn $52 per hosting referral at Lunarpages.
|
|
 |