Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 17 in printed book and digital formats -- plus a one-year subscription (beginning with 18.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 4.5

COLUMN

Process Priority

Change the priority of your process

Issue: 4.5 (May/June 2006)
Author: Christian Schmitz
Author Bio: Christian Schmitz is the creator of the Monkeybread Software REALbasic Plugins.
Article Description: No description available.
Article Length (in bytes): 6,840
Starting Page Number: 42
Article Number: 4516
Resource File(s):

Download Icon 4516.zip Updated: 2013-03-11 19:07:59

Related Link(s): None

Excerpt of article text...

Windows is a multitasking operation system, but sometimes you want to have all CPU power doing a certain task. For example you do a measurement and nothing else is running on that PC. Your application can process thousands of values for you, doing the job fast enough.

But then someone clicks on the screen -- in the task bar, for example -- and something is loaded, a window opens, and your application loses some values as the processing goes slower. For a second your application is only getting 10% of the CPU's attention; this can hurt your results if you do real time measurements.

A way to help here is to use process priorities to give your process the CPU nearly exclusively. Of course you'll still have the clocks in the background, but no virus scanner or print spooler -- and a click to the start menu won't slow down your application too much.

Find current process handle

The first step on the way to control priorities is to find a handle to our current process. You can find all the code embedded inside the example project, including the GetCurrentProcess method:

...End of Excerpt. Please purchase the magazine to read the full article.