de en es fr
Let the machine help
Light teasing, exhibition, BDSM, sissyfication, watersports... with sounds and pictures


Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Problem with waitWithGauge
PostPosted: Mon Jan 25, 2021 2:12 am 
Offline
Veteran
Has anyone noticed a problem with
Code:
waitWithGauge()
?

If so, is this a new thing or has it existed for a while?

I was testing a new script and noticed that the wait time on one of the tasks seemed long. So I ran it again and timed it, sure enough it took
Code:
waitWithGauge(40)
took 47 seconds to complete. So then I wrote a little test procedure and
Code:
waitWithGauge(60)
takes anywhere from 69 to 72 seconds to complete.

Can someone run this on their machine and let me know if you are seeing the same results?

Code:
def timeTest = {
   def startTime = 0
   def endTime = 0
   def totalTime = 0
   showButton("Start - 60 second test")
   startTime = getTime()
   waitWithGauge(60)
   endTime = getTime()
   totalTime = endTime - startTime
   show(totalTime)
   showButton("Okay")
}


FYI, I tried the same with a
Code:
wait(60)
and it returned 60 each time.


Top
 Profile Send private message 
 
 Re: Problem with waitWithGauge
PostPosted: Mon Jan 25, 2021 11:18 am 
Offline
Active member
I was curious about this issue.

I ran your test code, modified to repeatedly try times between 5 to 100 seconds and doing it multiple times.

I found they always came back too long.

It was quite consistent for multiple tries, usually within a second on each attempt.

It is not a constant offset so not caused by overheads in initialising the code.

I found it took 19-23% longer than asked for. Doesn't get noticeably better or worse for longer/shorter times.


Top
 Profile Send private message 
 
 Re: Problem with waitWithGauge
PostPosted: Mon Jan 25, 2021 12:40 pm 
Offline
Site Admin
User avatar
Interesting. Some overhead was expected, but not so much (on my main platform, 0.1%). A better algorithm can be included in the next release.
On which system do you get so much time ?


Top
 Profile Send private message 
 
 Re: Problem with waitWithGauge
PostPosted: Tue Jan 26, 2021 5:50 am 
Offline
Veteran
I'm running Win10 Home. I'm seeing 16 - 20% on my system.


Top
 Profile Send private message 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 8 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:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010 - 2020
This website uses session cookies only.