|
-
Jan 7th, 2022, 11:03 AM
#8
Re: Super Precision Timer
I'm not sure what the final objective is, but even putting it all in a separate thread may not accomplish what you want, Some1uk03. I mean, if you've got to get some perfectly timed events back into your main thread, I'm not sure that'll be possible. Sure, the events will be perfectly timed in the "worker" thread, but the messaging (with some event) to get them back into the main thread will have the same problems you're currently having. IMHO, it's not exactly timers you're struggling with, but rather the inconsistent monitoring of the message pump, and that's going to happen no matter what.
Now, if you do it all in some worker thread, then that might work ... some thread that's headless (with no forms to drag and nothing to stop it). Then, all you'll have to worry about is the consistency of the execution timeslices that Windows gives it to execute.
EDIT: You can partially solve the cpu/core timeslice issue by bumping up the thread priority. I wouldn't bump it up above "Above Normal" or bad things begin to happen, like your mouse not working and other things.
Last edited by Elroy; Jan 7th, 2022 at 11:16 AM.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|