Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QBJS v0.9.0 - Release
#20
(01-20-2025, 09:54 PM)dbox Wrote:
(01-15-2025, 05:50 AM)bplus Wrote: Also I noticed 2 things comparing QBJS code and QB64:
1) str$(number) in QBJS does not leave that space before a positive number as in QB64, so you have to _TRIM$() in QB64 so they look the same in print.
2) the _delay amounts aren't matching up, ie flashing that solved message in QB64 is way faster than in QBJS. had to fiddle to get a compromise.
Yeah I am still into having both codes work as closley to the same way as possible.

Hey @bplus, I looked into the _Delay issue a bit further and found that, at least on my box, I'm seeing a slightly more consistent delay in QBJS than in QB64.  Consider the following program:

Code: (Select All)
Dim first

first = Timer
_Delay 2
Print Timer - first

first = Timer
_Delay 1
Print Timer - first

first = Timer
_Delay .5
Print Timer - first

first = Timer
_Delay .25
Print Timer - first

first = Timer
_Delay .1
Print Timer - first

When I run this in QBJS (in Edge/Chromium), I get the following:

(I get an almost identical result in Firefox too)

For QB64 2.0.2:


For latest QB64PE:


I suspect that what you were seeing may be more related to how quickly (or often) the browser updates the title or some other aspect of the program.

Keep in mind, Timer by itself is going to have issues.  If you're looking for better precision, use Timer(0.001).

Code: (Select All)
Dim first As _Float

first = Timer(0.001)
_Delay 2
Print Timer(0.001) - first

first = Timer(0.001)
_Delay 1
Print Timer(0.001) - first

first = Timer(0.001)
_Delay .5
Print Timer(0.001) - first

first = Timer(0.001)
_Delay .25
Print Timer(0.001) - first

first = Timer(0.001)
_Delay .1
Print Timer(0.001) - first

I get much more precise results with the above, than with what you shared above. You may see if such a simple change would make the difference that you're looking for. Wink

   

Time on left is original, time on right is with changes.
Reply


Messages In This Thread
QBJS v0.9.0 - Release - by dbox - 01-13-2025, 09:47 PM
RE: QBJS v0.9.0 - Release - by bplus - 01-13-2025, 10:07 PM
RE: QBJS v0.9.0 - Release - by SMcNeill - 01-13-2025, 10:12 PM
RE: QBJS v0.9.0 - Release - by dbox - 01-13-2025, 11:06 PM
RE: QBJS v0.9.0 - Release - by bplus - 01-13-2025, 11:01 PM
RE: QBJS v0.9.0 - Release - by dbox - 01-13-2025, 11:15 PM
RE: QBJS v0.9.0 - Release - by SMcNeill - 01-13-2025, 11:47 PM
RE: QBJS v0.9.0 - Release - by bplus - 01-13-2025, 11:49 PM
RE: QBJS v0.9.0 - Release - by hsiangch_ong - 01-14-2025, 01:09 AM
RE: QBJS v0.9.0 - Release - by vince - 01-14-2025, 01:06 PM
RE: QBJS v0.9.0 - Release - by hsiangch_ong - 01-14-2025, 10:34 PM
RE: QBJS v0.9.0 - Release - by dbox - 01-15-2025, 12:44 AM
RE: QBJS v0.9.0 - Release - by bplus - 01-15-2025, 01:52 AM
RE: QBJS v0.9.0 - Release - by dbox - 01-15-2025, 04:18 AM
RE: QBJS v0.9.0 - Release - by bplus - 01-15-2025, 05:50 AM
RE: QBJS v0.9.0 - Release - by dbox - 01-15-2025, 05:03 PM
RE: QBJS v0.9.0 - Release - by dbox - 01-20-2025, 09:54 PM
RE: QBJS v0.9.0 - Release - by SMcNeill - 01-20-2025, 10:28 PM
RE: QBJS v0.9.0 - Release - by dbox - 01-20-2025, 10:31 PM
RE: QBJS v0.9.0 - Release - by PhilOfPerth - 04-09-2025, 03:40 AM
RE: QBJS v0.9.0 - Release - by grymmjack - 01-15-2025, 05:11 PM
RE: QBJS v0.9.0 - Release - by hsiangch_ong - 01-16-2025, 12:25 AM
RE: QBJS v0.9.0 - Release - by bplus - 01-20-2025, 10:42 PM
RE: QBJS v0.9.0 - Release - by SMcNeill - 01-20-2025, 10:51 PM
RE: QBJS v0.9.0 - Release - by bplus - 01-20-2025, 11:30 PM
RE: QBJS v0.9.0 - Release - by Pete - 01-21-2025, 05:31 PM
RE: QBJS v0.9.0 - Release - by bplus - 01-21-2025, 07:49 PM
RE: QBJS v0.9.0 - Release - by dbox - 02-04-2025, 08:54 PM
RE: QBJS v0.9.0 - Release - by eoredson - 04-09-2025, 02:46 AM
RE: QBJS v0.9.0 - Release - by dbox - 04-09-2025, 12:13 PM
RE: QBJS v0.9.0 - Release - by mdijkens - 04-22-2025, 10:23 AM
RE: QBJS v0.9.0 - Release - by dbox - 04-23-2025, 01:14 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  QBJS v0.10.0 - Release dbox 8 1,057 5 hours ago
Last Post: dbox
  QBJS v0.8.0 - Release dbox 11 2,365 02-13-2024, 10:11 PM
Last Post: grymmjack
  QBJS v0.8.2 - Release dbox 0 569 02-02-2024, 11:29 PM
Last Post: dbox
  BAM: Release notes in the works for upcoming release CharlieJV 6 1,434 10-12-2023, 01:42 AM
Last Post: CharlieJV
  QBJS v0.7.0 - Release dbox 19 4,158 06-12-2023, 07:48 PM
Last Post: dbox

Forum Jump:


Users browsing this thread: 1 Guest(s)