<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[100% Auslastung vermeiden]]></title><description><![CDATA[<p>Grüße!</p>
<p>Wie vermeide ich eigentlich eine 100% ige Auslastung eines Prozesses?</p>
<pre><code class="language-cpp">while(running) 
	{
	    if(PeekMessage(&amp;msg, NULL, 0, 0, PM_REMOVE)) 
		{
			TranslateMessage(&amp;msg);
			DispatchMessage(&amp;msg);
        }
		else
			;
    }
</code></pre>
<p>Selbst wenn ich nur einmal die Sekunde etwas machen möchte muss ich einen timer haben und immer Vergleichen und bin schon wieder bei 100%...</p>
<p>Prozess auf IDLE stellen hat auch nix gebracht...</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/161666/100-auslastung-vermeiden</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 09:34:04 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/161666.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 09 Oct 2006 22:10:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 100% Auslastung vermeiden on Mon, 09 Oct 2006 22:10:26 GMT]]></title><description><![CDATA[<p>Grüße!</p>
<p>Wie vermeide ich eigentlich eine 100% ige Auslastung eines Prozesses?</p>
<pre><code class="language-cpp">while(running) 
	{
	    if(PeekMessage(&amp;msg, NULL, 0, 0, PM_REMOVE)) 
		{
			TranslateMessage(&amp;msg);
			DispatchMessage(&amp;msg);
        }
		else
			;
    }
</code></pre>
<p>Selbst wenn ich nur einmal die Sekunde etwas machen möchte muss ich einen timer haben und immer Vergleichen und bin schon wieder bei 100%...</p>
<p>Prozess auf IDLE stellen hat auch nix gebracht...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1151872</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1151872</guid><dc:creator><![CDATA[Hello]]></dc:creator><pubDate>Mon, 09 Oct 2006 22:10:26 GMT</pubDate></item><item><title><![CDATA[Reply to 100% Auslastung vermeiden on Mon, 09 Oct 2006 22:42:43 GMT]]></title><description><![CDATA[<p>Emm...Was soll deine Schleife da oben denn bezwecken ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1151882</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1151882</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Mon, 09 Oct 2006 22:42:43 GMT</pubDate></item><item><title><![CDATA[Reply to 100% Auslastung vermeiden on Mon, 09 Oct 2006 23:00:10 GMT]]></title><description><![CDATA[<p>Garnix. Aber WENN ich jetzt immer vergleiche bis 10 Sekunden vergangen sind, dann etwas tue, wieder vergleiche bis....</p>
<p>Dann sind das trotzdem 100%...</p>
<p>Bei Borland MFC fügt man einfach nen Timer Objekt ein und hat nur minimale Auslastung... wie mache ich das in C++ Express?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1151887</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1151887</guid><dc:creator><![CDATA[Hello]]></dc:creator><pubDate>Mon, 09 Oct 2006 23:00:10 GMT</pubDate></item><item><title><![CDATA[Reply to 100% Auslastung vermeiden on Mon, 09 Oct 2006 23:10:53 GMT]]></title><description><![CDATA[<p>lol, deine Frage ist reichlich unpräzise und irgend wie sinnlos (hab auch noch nit mit Borland gearbeitet und hab das auch nicht vor) aber in der WinAPI gibt es auch Timer (-&gt; SetTimer/KillTimer oder etwas genauer: timeSetEvent/timeKillEvent, siehe MSDN).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1151890</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1151890</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Mon, 09 Oct 2006 23:10:53 GMT</pubDate></item><item><title><![CDATA[Reply to 100% Auslastung vermeiden on Tue, 10 Oct 2006 06:35:37 GMT]]></title><description><![CDATA[<p>Sleep(1); millisekunden</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1151930</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1151930</guid><dc:creator><![CDATA[^Gordon^]]></dc:creator><pubDate>Tue, 10 Oct 2006 06:35:37 GMT</pubDate></item><item><title><![CDATA[Reply to 100% Auslastung vermeiden on Tue, 10 Oct 2006 07:45:08 GMT]]></title><description><![CDATA[<p>Man kann natürlich die Applikation selbst mit einem Timer steuern, wenn die Aktion eben nicht zu schnell aufeinenaderfolgen soll (Auflösung &gt;50ms).<br />
Fensteranlegen SetTimer ausführen und auf WM_TIMER reagieren. Dann benötigst Du den Message Pump so nicht.</p>
<p>Die ist klar warum es 100% Auslastung gibt?<br />
Das Programm fragt nach einer Nachricht, ist keine da, wird sofort &quot;nichts&quot; ausgeführt und sofort wieder gefragt ist eine Nachricht da.<br />
Sleep ist eine (aber nicht so gute Lösung).<br />
MsgWaitForMultipleObjects ist flexibler und reagiert besser.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1151968</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1151968</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Tue, 10 Oct 2006 07:45:08 GMT</pubDate></item><item><title><![CDATA[Reply to 100% Auslastung vermeiden on Tue, 10 Oct 2006 12:12:40 GMT]]></title><description><![CDATA[<p>Warum baust du deine Schleife nicht so auf:</p>
<pre><code class="language-cpp">while(GetMessage(&amp;msg, NULL, 0, 0))
{
    TranslateMessage(&amp;msg);
    DispatchMessage(&amp;msg);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1152194</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1152194</guid><dc:creator><![CDATA[eas]]></dc:creator><pubDate>Tue, 10 Oct 2006 12:12:40 GMT</pubDate></item><item><title><![CDATA[Reply to 100% Auslastung vermeiden on Tue, 10 Oct 2006 12:15:21 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/12988">@eas</a>: Weil er damit nichts im Background machen kann, also dann wenn keine Nachricht mehr abzuarbeiten ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1152196</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1152196</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Tue, 10 Oct 2006 12:15:21 GMT</pubDate></item></channel></rss>