Search found 2318 matches

by deltarho[1859]
Oct 13, 2017 21:38
Forum: Windows
Topic: Extremely slow console/Graphics program [SOLVED]
Replies: 66
Views: 4337

Re: Extremely slow console/Graphics program [SOLVED]

@Trinity You are giving up too easily. We could leverage the best of both worlds. What we have is: Problem [1] Sleep: Not very accurate, no CPU time. Polling: Very accurate, CPU intensive. which is analogous to Problem [2] Class B amplifier: Not exactly HiFi but cheap. Class A amplifier: HiFi but ex...
by deltarho[1859]
Oct 13, 2017 19:18
Forum: Windows
Topic: Extremely slow console/Graphics program [SOLVED]
Replies: 66
Views: 4337

Re: Extremely slow console/Graphics program [SOLVED]

@Trinity Well, it looks good but it is very CPU intensive. Polling Timer on a modern Windows machine is effectively polling the Performance Counter. On my machine, Task Manager tells me that CallInkey is using about 13% CPU time. In fact, one of the cores on my i7 is maxed out. The beauty of Sleep i...
by deltarho[1859]
Oct 12, 2017 22:42
Forum: Windows
Topic: Extremely slow console/Graphics program [SOLVED]
Replies: 66
Views: 4337

Re: Extremely slow console/Graphics program [SOLVED]

Just found out that some browsers, including Chrome, notice when battery power is being used and switch to the default resolution. This subject is bigger than I thought it was.
by deltarho[1859]
Oct 12, 2017 21:53
Forum: Windows
Topic: Extremely slow console/Graphics program [SOLVED]
Replies: 66
Views: 4337

Re: Extremely slow console/Graphics program [SOLVED]

Here firefox and chrome set the resolution to 1 ms. That really surprised me. I thought that all browsers were behaving themselves nowadays. There is no reason why a 1ms resolution should be imposed upon us for the whole of a browsing session. Good for Microsoft. Added: I can now understand why goi...
by deltarho[1859]
Oct 12, 2017 18:26
Forum: Windows
Topic: Extremely slow console/Graphics program [SOLVED]
Replies: 66
Views: 4337

Re: Extremely slow console/Graphics program [SOLVED]

a FreeBASIC forum page is guaranteed 1 ms. in chrome. I don't have Chrome so I cannot dispute that but, if true, then that is bad news for anyone using battery power on their laptop. My PC uses about 30% more power with a 1ms resolution compared with 15.625ms. With Edge and Slimjet, with my arms fo...
by deltarho[1859]
Oct 12, 2017 16:14
Forum: Windows
Topic: Extremely slow console/Graphics program [SOLVED]
Replies: 66
Views: 4337

Re: Extremely slow console/Graphics program [SOLVED]

Slightly off topic but it has been a while since I tested browsers with TimerInterval. On board I have Microsoft Edge, Internet Explorer 11 and FlashPeak Slimjet (based on Chromium (64 bit)). My OS is Windows 10. Needless to say only one browser was loaded at a time. Whilst reading a page all of the...
by deltarho[1859]
Oct 10, 2017 18:45
Forum: Windows
Topic: Extremely slow console/Graphics program [SOLVED]
Replies: 66
Views: 4337

Re: Extremely slow console/Graphics program [SOLVED]

The last code by dodicat is Windows only because it uses timeBeginPeriod(1)/timeEndPeriod(1) as do my macros. The (1) part is changing the timer resolution to 1ms. Running TimerRes we can see the resolution oscillating between 1ms and 15.625ms. This is due to the Windows functions being invoked arou...
by deltarho[1859]
Oct 10, 2017 14:51
Forum: Windows
Topic: Extremely slow console/Graphics program [SOLVED]
Replies: 66
Views: 4337

Re: Extremely slow console/Graphics program [SOLVED] for now !

Didn't really expect you to learn anything from it but no harm done in presenting the links to you Don't think twice about it. Nearly everything I learnt about this topic was got from 'trial and error' and my 'What if' approach to coding. There is no mention of the presets in TimerRes at Microsoft....
by deltarho[1859]
Oct 10, 2017 14:04
Forum: Windows
Topic: Extremely slow console/Graphics program [SOLVED]
Replies: 66
Views: 4337

Re: Extremely slow console/Graphics program [SOLVED] for now !

With the Windows 10 version I have used a minmalist approach and on opening we get this: http://deltarho.org.uk/Downloads/TimerInterval.jpg To change the resolution we simply right click on the title bar to be presented with a list of presets when we choose 'Set'. You will notice that the 'Current t...
by deltarho[1859]
Oct 10, 2017 12:52
Forum: Windows
Topic: Extremely slow console/Graphics program [SOLVED]
Replies: 66
Views: 4337

Re: Extremely slow console/Graphics program [SOLVED] for now !

With regard the System clock it is worth mentioning that Windows employs the principle that the current timer interval is the smallest timer interval chosen by any open process. If we run TimerRes and choose, say, 1.0ms then the resolution will change to 1.0ms. If we now run another instance of Time...
by deltarho[1859]
Oct 10, 2017 12:14
Forum: Windows
Topic: Extremely slow console/Graphics program [SOLVED]
Replies: 66
Views: 4337

Re: Extremely slow console/Graphics program [SOLVED] for now !

Here is a zip of TimerRes.exe. TimerRes The 0.5ms setting will actually give 1ms for Windows 7 and earlier. It should work from Windows NT onward, including Windows 10. The Windows 10 version utilises the continuous function aspect but has been configured to being discrete with resolutions from 0.5m...
by deltarho[1859]
Oct 10, 2017 11:35
Forum: Windows
Topic: Extremely slow console/Graphics program [SOLVED]
Replies: 66
Views: 4337

Re: Extremely slow console/Graphics program [SOLVED] for now !

@Trinity So I ran the Windows Timestamp Project! G_Kernel which set the timer to 1.000 ms That is using a sledgehammer to crack a nut. Here is your opening post 'tweaked' with 'StartHiResSleep' - flashing like a treat.<smile> #include "windows.bi" #include "win/mmsystem.bi" #incl...
by deltarho[1859]
Oct 10, 2017 10:53
Forum: Community Discussion
Topic: Guilty as charged
Replies: 73
Views: 6813

Re: Guilty as charged

i can't walk and talk and chew bubble gum at the same time. Who the hell can? I am reminded of the old joke. Patient: "Doctor, it hurts when I do this." Doctor: "Well, don't do it then!". The secret is: Get the code working first, optimise it later. I have lost count on the numb...
by deltarho[1859]
Oct 10, 2017 10:25
Forum: Windows
Topic: Extremely slow console/Graphics program [SOLVED]
Replies: 66
Views: 4337

Re: Extremely slow console/Graphics program

Blimey, in Windows a lot of you guys are using something like 'Sleep 1,1' in loops and are expecting a 1ms Sleep. Sleep is governed by the System clock which defaults to a resolution of 15.625ms. See this post back in March 2017. Later on fxm mentioned that #include "windows.bi" #include &...
by deltarho[1859]
Oct 10, 2017 3:26
Forum: Windows
Topic: Extremely slow console/Graphics program [SOLVED]
Replies: 66
Views: 4337

Re: Extremely slow console/Graphics program

Browsers used to have a bad habit of changing the timer interval, usually at 15.625ms (64Hz), to 1ms (1000Hz) for various jobs and forgot to restore to the default. Laptop batteries used to drain much quicker and the computing press made a ruckus about it. Things have changed and browsers are much b...

Go to advanced search