Re: Is delphi a good introduction to programming?
- From: erewhon@xxxxxxxxxx (J French)
- Date: Tue, 10 May 2005 09:05:59 +0000 (UTC)
On Tue, 10 May 2005 08:29:43 GMT, "Paul Dunn"
<paul.dunn4@xxxxxxxxxxxx> wrote:
<snip>
>The biggest problem I encountered (and have yet to find a solution for) is
>that when running the emulation in the idle loop, everything runs smoothly
>until some other application takes any CPU time, at which point my app
>stalls and stutters. My app consumes about 1-2% CPU time, and if another app
>takes any more than 4% CPU then my app is stalled. I can't figure that out
>at all. My loop consists of emulating a frame (20ms, or 69888 cycles) of Z80
>code, then sleeps in 1ms intervals until the full real 20ms has elapsed.
>This typically results in 18-19ms of sleep time per frame, but I still get
>the stuttering.
>
>I think it's a fault of application.run; but I have no idea how to get
>around it :(
Have you looked at the API: SetPriorityClass
<quote>
HIGH_PRIORITY_CLASS
Specify this class for a process that performs time-critical tasks
that must be executed immediately. The threads of the process preempt
the threads of normal or idle priority class processes. An example is
Windows Task List, which must respond quickly when called by the user,
regardless of the load on the operating system. Use extreme care when
using the high-priority class, because a high-priority class
application can use nearly all available CPU time.
</quote>
.
- Follow-Ups:
- Re: Is delphi a good introduction to programming?
- From: Martin Harvey
- Re: Is delphi a good introduction to programming?
- From: Paul Dunn
- Re: Is delphi a good introduction to programming?
- References:
- Is delphi a good introduction to programming?
- From: casioculture
- Re: Is delphi a good introduction to programming?
- From: fphsml
- Re: Is delphi a good introduction to programming?
- From: Paul Dunn
- Re: Is delphi a good introduction to programming?
- From: alanglloyd@xxxxxxx
- Re: Is delphi a good introduction to programming?
- From: Paul Dunn
- Re: Is delphi a good introduction to programming?
- From: Alf Christophersen
- Re: Is delphi a good introduction to programming?
- From: Paul Dunn
- Re: Is delphi a good introduction to programming?
- From: Bruce Roberts
- Re: Is delphi a good introduction to programming?
- From: Paul Dunn
- Re: Is delphi a good introduction to programming?
- From: Maarten Wiltink
- Re: Is delphi a good introduction to programming?
- From: Paul Dunn
- Re: Is delphi a good introduction to programming?
- From: Maarten Wiltink
- Re: Is delphi a good introduction to programming?
- From: Paul Dunn
- Is delphi a good introduction to programming?
- Prev by Date: Re: Is delphi a good introduction to programming?
- Next by Date: Re: Is delphi a good introduction to programming?
- Previous by thread: Re: Is delphi a good introduction to programming?
- Next by thread: Re: Is delphi a good introduction to programming?
- Index(es):
Relevant Pages
|