I did a bit of testing on an iPhone 4.
I commented out, in turn, either the trigger for timeOut or the trigger for scheduleEventTest.
PHP Code:
//#CLIENTSIDE
function onCreated() {
this.loopCount = 0;
this.trigger("scheduleEventTest");
// this.trigger("timeOut");
}
function onScheduleEventTest() {
this.loopCount ++;
player.chat = this.loopCount;
this.scheduleEvent(0.05, "scheduleEventTest");
}
function onTimeOut() {
this.loopCount ++;
player.chat = this.loopCount;
this.setTimer(0.05);
}
Results from clientstats after running for about 4 minutes (until the loop counter hit 5k):
scheduleEvent:
Quote:
1. 1.35521233 % Weapon Shared/iPhoneLoopTest
onCreated: 0.000052182 %
onScheduleEventTest: 1.074318247 %
|
setTimer:
Quote:
1. 1.271795034 % Weapon Shared/iPhoneLoopTest
onCreated: 0.000053123 %
onTimeOut: 1.037823939 %
|
I closed and re-opened Graal before each test on the iPhone.