View Single Post
Old 07 February 2021, 10:48   #54
robinsonb5
Registered User
 
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,157
Quote:
Originally Posted by litwr View Post
You changed the subject. It was about the correction in OS which stopped clear its timer since WB 2.
The point you're missing is that, provided the OS interfaces (i.e. timer.device and any other timing-related functions the operating system provides) do the right thing, what the OS does to the timer in the background is actually none of your business, or mine, or anyone else's. It can clear the counter ten times a second if it really wants to, provided the OS interfaces give correct results. It might be inconvenient, but it's not *wrong*.

The principle is very simple - while the OS is running it owns the hardware.

The published OS interfaces are a contract by which the OS pledges to behave in a certain way. You can make no assumptions about *how* the OS fulfils that pledge, and as you noticed, it will vary from version to version.

Your end of that contract, as a programmer, is not to touch the hardware, or make any assumptions about what the OS is doing with the hardware.

If you're not willing to abide by your end of the contract then you have to disable the OS. At that point you have full control over the hardware and can do whatever you want with it.

If the OS does things to the hardware that you're not expecting, even if it's only one particular version of the OS, it's fine to say "This is really inconvenient" - but it's not fine to say "There's a bug in this version of the OS", because at no point did the OS ever promise not to do the thing that's annoying you!
robinsonb5 is offline  
 
Page generated in 0.04375 seconds with 11 queries