XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently 2017年 Dec 13日 18:32

All times are UTC - 8 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: 2013年 Aug 2日 17:09 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
Is a timer interval less than one second possible?

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


Last edited by yereverluvinuncleber on 2015年 Nov 22日 17:04, edited 3 times in total.

Top
 Profile  
 
PostPosted: 2013年 Aug 9日 18:35 
Offline

Joined: 2012年 Jun 18日 00:07
Posts: 269
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 ?


Top
 Profile  
 
PostPosted: 2013年 Aug 10日 03:18 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
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.


Top
 Profile  
 
PostPosted: 2014年 Oct 19日 12:01 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
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?


Top
 Profile  
 
PostPosted: 2014年 Oct 25日 19:31 
Offline

Joined: 2013年 Oct 26日 08:17
Posts: 362
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


Top
 Profile  
 
PostPosted: 2014年 Oct 26日 04:26 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
Thanks Hamid, I will re-test - perhaps it is my code...


Top
 Profile  
 
PostPosted: 2015年 Jan 30日 20:22 
Offline
User avatar

Joined: 2013年 Mar 8日 22:27
Posts: 357
Windows Javascript is sloooow. I've seen lags of about 1s in one of my widgets

_________________
Life is a myriad game... Just play it!


Top
 Profile  
 
PostPosted: 2015年 Jan 30日 20:58 
Offline

Joined: 2012年 Jun 18日 00:07
Posts: 269
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.


Top
 Profile  
 
PostPosted: 2015年 Feb 2日 08:19 
Offline
User avatar

Joined: 2013年 Mar 8日 22:27
Posts: 357
I upgraded IE to version 11 and JS performs better. Yes, mouse events also cause lags

_________________
Life is a myriad game... Just play it!


Top
 Profile  
 
PostPosted: 2015年 Feb 2日 13:37 
Offline

Joined: 2012年 Jun 18日 00:07
Posts: 269
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.


Top
 Profile  
 
PostPosted: 2015年 Nov 21日 18:44 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 572
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Powered by phpBB® Forum Software © phpBB Group