Ok, I have to join the windows world ...



I've been in embedded/real-time for a long time. I've put-off having
to learn the Microsquash programming world for a while. I now an
submitting .... In any embedded O/S or kernel, the following is
easy...

I've written utilities using VC++ (6.0) on and off, mainly repackaging
binaries for CRC's, Hex/S formats etc... I'm running on XP pro.

I need to make a "continuous" calculation, say 10 -> 100 times a
second.

The calculation is not compute intensive.

I want to "sleep" the process/task/thread for the appropriate time to
achieve the
required frequency... I do not want to do busy-waiting in a loop, I
have to free up the
CPU bandwidth for other stuff...

I know Windows is NOT real-time or deterministic by any stretch of the
imagination...
It's not required for the simulation I'm doing...

so .... the pattern is simply for now, compute; print; sleep ->
eventually I'm going to pass this compute result to another "process"
running on the CPU -> another cosole instance is preferred.

This is a CONSOLE app... There appears to be a POSIX interface that
may allow me to do what I need, is there any other API I can use that
will allow me to remain in a console APP?
or do I have to submit myself to re-learning the windows proc loop to
use windows API's for this??? Hmmm, just remembered a book on
windows/NT threading I think...

BUT, I come here first for the wizened sages who have gone thru
learning window "re-terminology" for all we learned in school (the way
back machine here... Windows was still 16 bit when I was in school....)

TIA,
-Dan

.



Relevant Pages

  • Re: post hibernate situation
    ... Even though your application is a Console app, ... Windows APIs? ... > be able to power up and be at the same point in the application where he ... when I hibernate with the application running and then ...
    (microsoft.public.windowsxp.embedded)
  • Re: An easy way to convert printfs to TextBox->Appends?
    ... >In converting a console app to windows, I'd like to emulate the console ... >translate the c style format strings into .NET format strings. ... int SevEditPrintf(HWND hedit, LPCTSTR fmt, ...) ... Microsoft MVP, Windows SDK ...
    (microsoft.public.dotnet.languages.vc)
  • Re: post hibernate situation
    ... don't have any windows. ... I'm just a console app. ... > or .NET Framework in order to access power management messages - your app ... when I hibernate with the application running and then ...
    (microsoft.public.windowsxp.embedded)
  • Re: Creating a Project no form
    ... Service or an executable run by the Scheduler. ... If you put all the real functionality in a Class Library, you can reference this library from both a console app project and a windows service project. ... While you're going to be loading a bunch of data into a Database (SQL Server?) you might also want to consider using Sql Server Integration Services combined with a Sql Agent Job. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: BP Program execution under WinXP
    ... all other applications get more CPU idle time. ... The NT/2k/XP series of windows is simply less fit to run Dos programs and ... to write a console app that detects when the directory ... I'd look at the Windows int 2F services or to a simple semaphore file and ...
    (comp.lang.pascal.borland)