XWidgetSoft Forum
https://www.bbs.xwidget.com/

BUG: timer interval less than 1 second - possible? - REOPEN
https://www.bbs.xwidget.com/viewtopic.php?f=8&t=3445
Page 1 of 1

Author:  yereverluvinuncleber [ August 2nd, 2013, 5:09 pm ]
Post subject:  BUG: timer interval less than 1 second - possible? - REOPEN

Is a timer interval less than one second possible?

I wish to set a timer of 1/3rd of a second or 333ms.

Author:  meme [ August 9th, 2013, 6:35 pm ]
Post subject:  Re: HELP: timer interval less than 1 second - possible?

Quote:
Is a timer interval less than one second possible?
Do you mean in javascript? If so, yes time values are in milliseconds.
Quote:
I wish to set a timer of 1/3rd of a second or 333ms.
What will start the timer?
What will the timer then do, or do when the time is finished ?

Author:  yereverluvinuncleber [ August 10th, 2013, 3:18 am ]
Post subject:  Re: HELP: timer interval less than 1 second - possible?

You are quite correct, what confused me was that when I set the timer to 300 (hopefully in ms) in the IDE it posted below "300 Minute(s) Second(s)econd(s)" - very confusing...

Also the drop-down only provided a minimum value of 1 second.

Meme - Thanks for your assistance.

Author:  yereverluvinuncleber [ October 19th, 2014, 12:01 pm ]
Post subject:  Re: HELP: timer interval less than 1 second - possible? - CL

Although the timer can be defined at less that 500ms it does not seem to make much difference, the standard timer seems to be stuck at 500ms, is there a reason for this?

I have set up a timer that looks at the system volume periodically and if that has changed recently it then moves a slider. The delay between the system volume being lowered/raised and the widget slider responding is approx 500ms. If I set the timercore interval to less than 500ms it seems to have little or no effect.

It seems as if the timerCore interval can be set at less than 500ms but 500ms is actually the practical value as smaller values are ignored?

Author:  hamid [ October 25th, 2014, 7:31 pm ]
Post subject:  Re: HELP: timer interval less than 1 second - possible? - RE

i have checked volumecore's update interval,
and it supports values lower than 500 without any problem,
it works even if you set it to 1ms



even i have tested timercore,
and it works correctly,

you can test it by this code:
Code:
i=0
function timercore1OnUpdate(Sender)
{
print(i++)
}

Note:
set the different update interval values in the core
to see the difference in speed of printing in log section

Author:  yereverluvinuncleber [ October 26th, 2014, 4:26 am ]
Post subject:  Re: HELP: timer interval less than 1 second - possible? - RE

Thanks Hamid, I will re-test - perhaps it is my code...

Author:  digigamer [ January 30th, 2015, 8:22 pm ]
Post subject:  Re: HELP: timer interval less than 1 second - possible? - RE

Windows Javascript is sloooow. I've seen lags of about 1s in one of my widgets

Author:  meme [ January 30th, 2015, 8:58 pm ]
Post subject:  Re: HELP: timer interval less than 1 second - possible? - RE

Hi digigamer
I have been frustrated with lags or pauses in javascript execution for some time, I don't know if your cause is the same as mine but I finally fixed mine just recently.
I noticed the lag effect when moving the mouse quickly over objects that change effects.
After isolating other programs on my PC with no luck, I came back to xwidget itself. I have two widgets running, I found shutting down the other widget stopped the lagging effect.
The other widget has several different cores running, I found the problem was caused by diskcore1 and diskcore2 being triggered at the same time interval 1000ms.
Disabling one of the cores solved the problem. I now have the core triggered at 1600ms and 2100ms and all runs smoothly.

Author:  digigamer [ February 2nd, 2015, 8:19 am ]
Post subject:  Re: HELP: timer interval less than 1 second - possible? - RE

I upgraded IE to version 11 and JS performs better. Yes, mouse events also cause lags

Author:  meme [ February 2nd, 2015, 1:37 pm ]
Post subject:  Re: HELP: timer interval less than 1 second - possible? - RE

Quote:
Yes, mouse events also cause lags

Mouse events had nothing to do with causing the lag, they only allowed me to see the lag.

Author:  yereverluvinuncleber [ November 21st, 2015, 6:44 pm ]
Post subject:  Re: HELP: timer interval less than 1 second - possible? - RE

BUG 1: Sorry to resurrect this thread but I found that the standard timercore core does not seem to respect times set below 500ms.

The VolumeCore timer does respect times set below 500ms but the standard timercore does not seem to in my testing.

BUG 2: I have also noticed that if the interval of the VolumeCore is set below 1000ms that it is saved correctly in the main.xul file but when you click on the volumecore in the designer in order to view its parameters the displayed interval defaults incorrectly back to 1000ms. This is a bug.

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/