Search found 1039 matches

by jj2007
Jan 23, 2019 14:05
Forum: Beginners
Topic: timer vs GetTickCount64 precision
Replies: 19
Views: 455

Re: timer vs GetTickCount64 precision

deltarho[1859] wrote:NtDelayExecution ... uses the system clock at 64Hz.
I doubt that, because I get a 1ms resolution, see Delay until
by jj2007
Jan 23, 2019 13:16
Forum: Beginners
Topic: timer vs GetTickCount64 precision
Replies: 19
Views: 455

Re: timer vs GetTickCount64 precision

Yeah, my answer was a hack, and not the best one <smile>

If you want a more professional solution, check NtDelayExecution.
by jj2007
Jan 23, 2019 1:30
Forum: Beginners
Topic: timer vs GetTickCount64 precision
Replies: 19
Views: 455

Re: timer vs GetTickCount64 precision

Nice idea, deltarho! Of course, I couldn't resist the temptation to steal it, see Hi resolution Sleep.
by jj2007
Jan 21, 2019 18:32
Forum: Beginners
Topic: timer vs GetTickCount64 precision
Replies: 19
Views: 455

Re: timer vs GetTickCount64 precision

The downside of timeBeginPeriod is that it acts system-wide: Your machine will work harder. Therefore it is generally considered anti-social behaviour if an application sets timeBeginPeriod to 1ms. Which doesn't stop, for example, Firefox to use it with videos. In case of doubt, I would opt for QPC ...
by jj2007
Jan 21, 2019 14:01
Forum: Beginners
Topic: timer vs GetTickCount64 precision
Replies: 19
Views: 455

Re: timer vs GetTickCount64 precision

Define "more precise"... granularity or absolute precision? Here is a simple comparison between GetTickCount and QPC (pseudocode): For_ ct=1 To 20 NanoTimer() ; QueryPerformanceCounter For_ ecx=0 To 9999999 void Sqrt(ecx) Next Print NanoTimer$() mov gtc, rv(GetTickCount) For_ n=0 To 999999...
by jj2007
Jan 21, 2019 11:13
Forum: Libraries
Topic: No german umlauts with libcurl
Replies: 25
Views: 819

Re: No german umlauts with libcurl

If I submit "ä" instead of "%C3%A4" I get a response saying "Zufällige Seite nicht gefunden" (random site not found). It works with my version, see Download URL with UTF8 (no guarantee that the OS allows the download, though). The point is that "ä" can be Asc...
by jj2007
Jan 21, 2019 10:44
Forum: Tips and Tricks
Topic: Dedication check.
Replies: 8
Views: 409

Re: Dedication check.

dodicat wrote:I have 24 gcc.exe here
For decades, I worked with exactly ONE GfaBasic installation. I had to abandon Gfa when M$ stopped supporting 16-bit applications. In contrast, Gcc is an ugly mess, and unfortunately some seem eager to turn FB into a Gcc clone.
by jj2007
Jan 21, 2019 8:47
Forum: Tips and Tricks
Topic: Dedication check.
Replies: 8
Views: 409

Re: Dedication check.

dodication check failed miserably - but it seems to work with the full path for "where" (awfully slow, of course - it's still running): 'shell to include unicode declare function wsystem cdecl alias "_wsystem" (byval as wstring ptr) as long #Include "file.bi" function s...
by jj2007
Jan 20, 2019 18:14
Forum: Libraries
Topic: No german umlauts with libcurl
Replies: 25
Views: 819

Re: No german umlauts with libcurl

The URL that I extracted from the (german) homepage of Wikipadia already is percent-encoded ("https://de.wikipedia.org/wiki/Spezial:Zuf%C3%A4llige_Seite"), but libcurl obviously can't handle it. I was about to ask "are you sure?" because it works fine with the Utf8 version of &q...
by jj2007
Jan 20, 2019 8:20
Forum: Community Discussion
Topic: Moderator's Environment and Tools.
Replies: 4
Views: 288

Re: Moderator's Environment and Tools.

Spot on, Richard! I wonder if there is a technical obstacle to implementing your suggestions?
by jj2007
Jan 19, 2019 10:30
Forum: Windows
Topic: Can't we use SHELL32 dll like USER32?
Replies: 10
Views: 266

Re: Can't we use SHELL32 dll like USER32?

Not sure of everything that you might have installed and where. In the fbc folder should be sub-folders: ./lib/win32/libshell32.dll.a -- import lib for 32-bit ./lib/win64/libshell32.dll.a -- import lib for 64-bit And fbc should just find them. At the risk of sparking a little war: The weakest point...
by jj2007
Jan 18, 2019 17:16
Forum: Libraries
Topic: No german umlauts with libcurl
Replies: 25
Views: 819

Re: No german umlauts with libcurl

The terminology may be confusing, and dealing with the Utf8-encoded Unicode is certainly not trivial, but it isn't rocket science, either. It just needs to be implemented in FB; this is assembler: Let my$="Добро Пожаловать" ; "Welcome" in Russian PrintLine my$ PrintLine Lower$(my...
by jj2007
Jan 18, 2019 16:35
Forum: Windows
Topic: Can't we use SHELL32 dll like USER32?
Replies: 10
Views: 266

Re: Can't we use SHELL32 dll like USER32?

Your code (the one at the top) builds and runs fine with -gen gcc -Wc -Ofast -s console and gcc version 8.1.0, but it chokes indeed with Gas32 and Gcc64.
by jj2007
Jan 18, 2019 16:29
Forum: Libraries
Topic: No german umlauts with libcurl
Replies: 25
Views: 819

Re: No german umlauts with libcurl

counting_pine wrote:it expects UTF-8 strings rather than multibyte strings. That's why it only accepts zstrings.
What is the difference between a UTF-8 and a multibyte string? (I've read the Spolsky article thoroughly)
by jj2007
Jan 18, 2019 2:55
Forum: Libraries
Topic: No german umlauts with libcurl
Replies: 25
Views: 819

Re: No german umlauts with libcurl

- whether the ä character or %C3%A4 is used in the string My version     pBuffer= FileRead$ ("https://de.wikipedia.org/wiki/Spezial:Zufällige_Seite") definitely uses (tested successfully with Win7-64 and Win10) the ä character in its UTF8 encoding . Under the hood, it's InternetOpenUrl A ...

Go to advanced search