It is currently Sat Oct 19, 2019 1:40 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: [Done] EllapsedMilliseconds() help inconsistency.
PostPosted: Sun Jul 14, 2019 9:22 pm 
Offline
User
User
User avatar

Joined: Tue Jun 07, 2011 5:38 pm
Posts: 12
Hi.
Not sure if has already been reported (i searched...), so:
PB 5.70LTS x86 on Win 10.

When using EllapsedMilliseconds()
The command help at the status bar states:
"Returns the number of milliseconds ellapsed since computer start".
Its a left-over from the older behavior.
PB help file has the correct "Returns the number of milliseconds that have elapsed since a specific time in the past".
Maybe the command help at the status bar should be updated?
Thanx.

_________________
**Disclaimer**
Any views or opinions expressed represent the official view of the voices in my head.


Top
 Profile  
Reply with quote  
 Post subject: Re: EllapsedMilliseconds() help inconsistency.
PostPosted: Mon Jul 15, 2019 7:43 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Sep 11, 2016 2:17 pm
Posts: 535
Wasnt GetTickCount_() the internal fallback function on Windows?


Top
 Profile  
Reply with quote  
 Post subject: Re: EllapsedMilliseconds() help inconsistency.
PostPosted: Mon Jul 15, 2019 9:09 pm 
Offline
User
User
User avatar

Joined: Tue Jun 07, 2011 5:38 pm
Posts: 12
Mijikai wrote:
Wasnt GetTickCount_() the internal fallback function on Windows?


Possibly, I don't really know, but irrelevant anyway.
The issue I mention here is for the quick help description,
not the function itself.

_________________
**Disclaimer**
Any views or opinions expressed represent the official view of the voices in my head.


Top
 Profile  
Reply with quote  
 Post subject: Re: EllapsedMilliseconds() help inconsistency.
PostPosted: Tue Jul 16, 2019 11:11 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1968
Location: Germany
Elapsemillicends() start with the program

GetTickCount_() starts with the PC

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: EllapsedMilliseconds() help inconsistency.
PostPosted: Wed Jul 17, 2019 4:35 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Dec 23, 2003 3:54 am
Posts: 1661
You are 100% correct K1m0n, the status bar description needs to be updated.


(For what it's worth the behavior of ElapsedMilliseconds() changed a few years back, I don't known which PB version.
This is why you can't use the old trick of RandomSeed(ElapsedMilliseconds()) -- you would always be using Seed 0)

_________________
On GitHub: PB Includes - IDE Tools - Color Themes


Top
 Profile  
Reply with quote  
 Post subject: Re: EllapsedMilliseconds() help inconsistency.
PostPosted: Wed Jul 17, 2019 9:54 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Apr 18, 2019 8:17 am
Posts: 333
kenmo wrote:
This is why you can't use the old trick of RandomSeed(ElapsedMilliseconds()) -- you would always be using Seed 0)

Just call ElapsedMilliseconds() when your app starts, and then all future calls of RandomSeed(ElapsedMilliseconds()) will give a random seed.


Top
 Profile  
Reply with quote  
 Post subject: Re: EllapsedMilliseconds() help inconsistency.
PostPosted: Wed Jul 17, 2019 10:51 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Dec 23, 2003 3:54 am
Posts: 1661
RandomSeed(Date()) also works, assuming you're not launching your program multiple times per second (GUI program, game, etc.)

Of course, this doesn't really matter because:
Quote:
Each time a program is started, a new seed is generated, therefore RandomSeed() is useful only when the goal is to generate the same random numbers in the same order every time the program is executed.

_________________
On GitHub: PB Includes - IDE Tools - Color Themes


Top
 Profile  
Reply with quote  
 Post subject: Re: EllapsedMilliseconds() help inconsistency.
PostPosted: Wed Jul 17, 2019 11:05 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 13, 2010 3:45 pm
Posts: 907
mk-soft wrote:
Elapsemillicends() start with the program
ElapsedMilliseconds() starts with the first call, at least that's how it is in Windows.

K1m0n is of course right with the bug report and it should also be used the message from the help quoted by him.

_________________
sorry for my bad english


Top
 Profile  
Reply with quote  
 Post subject: Re: EllapsedMilliseconds() help inconsistency.
PostPosted: Fri Aug 09, 2019 9:18 am 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13622
Location: France
Fixed.


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye