[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linrad] Re: Resources



You want to use the performance monitoring functions (preferrable to the registry reads but I have little experience with them).

Bob





Robert McGwier wrote:

#include <stdio.h>
#include <windows.h>

main()
{
   LARGE_INTEGER frequency,counter, oldcounter;
   BOOL Result;
   int i=0;

   Result = QueryPerformanceFrequency(&frequency);
   Result = QueryPerformanceCounter(&oldcounter);
   do {

       Sleep(1);
               } while( i++ < 10);
   QueryPerformanceCounter(&counter);
printf("Elapsed time is %lf\n", ((double)counter.QuadPart - (double)oldcounter.QuadPart)/(double)frequency.QuadPart);
   printf("done\n");
}



Link with kernel32.dll

Bob





Joe Taylor wrote:

Bill --

Linrad is a complicated program with very tight real-time constraints. As a consequence, Leif prefers a lean-and-mean approach in which one can understand, at a detailed level, as much as possibly of what is going on.

If the access to the Registry is required, so be it. If you can produce a simple C routine that wraps the necessary system calls and produces a fractional CPU load, so that another C routine can access it, I am sure that Leif would greatly appreciate it!

With best wishes,

    -- 73, Joe, K1JT

Bill Tracey wrote:

Don't know that there is a single call to do it .. the Pdh/registry stuff can do it from straight C -- takes a few calls though. What's the issue with looking in the Registry?

Cheers,

Bill (kd5tfd)

At 09:08 PM 8/25/2005, Joe Taylor wrote:

Thanks, Bill. I have found references like the URL you kindly provided.

What we are looking for, I'm afraid, is a way to get at the desired information from "plain old C". No C#, no .Net, no Registry, just a plain vanilla system call. As far as I can tell, one does not exist in Windows.
                        -- Joe, K1JT



#############################################################
This message is sent to you because you are subscribed to
 the mailing list <linrad@xxxxxxxxxxxxxxxxxxxxx>.
To unsubscribe, E-mail to: <linrad-off@xxxxxxxxxxxxxxxxxxxxx>
To switch to the DIGEST mode, E-mail to <linrad-digest@xxxxxxxxxxxxxxxxxxxxx> To switch to the INDEX mode, E-mail to <linrad-index@xxxxxxxxxxxxxxxxxxxxx>
Send administrative queries to  <linrad-request@xxxxxxxxxxxxxxxxxxxxx>






#############################################################
This message is sent to you because you are subscribed to
 the mailing list <linrad@xxxxxxxxxxxxxxxxxxxxx>.
To unsubscribe, E-mail to: <linrad-off@xxxxxxxxxxxxxxxxxxxxx>
To switch to the DIGEST mode, E-mail to <linrad-digest@xxxxxxxxxxxxxxxxxxxxx> To switch to the INDEX mode, E-mail to <linrad-index@xxxxxxxxxxxxxxxxxxxxx>
Send administrative queries to  <linrad-request@xxxxxxxxxxxxxxxxxxxxx>






#############################################################
This message is sent to you because you are subscribed to
 the mailing list <linrad@xxxxxxxxxxxxxxxxxxxxx>.
To unsubscribe, E-mail to: <linrad-off@xxxxxxxxxxxxxxxxxxxxx>
To switch to the DIGEST mode, E-mail to <linrad-digest@xxxxxxxxxxxxxxxxxxxxx>
To switch to the INDEX mode, E-mail to <linrad-index@xxxxxxxxxxxxxxxxxxxxx>
Send administrative queries to  <linrad-request@xxxxxxxxxxxxxxxxxxxxx>

LINRADDARNIL
r