<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Timer</title>
		<link>http://www.allegro.cc/forums/view/387215</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sun, 25 Jul 2004 06:01:35 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/install_int" target="_blank"><span class="a">install_int</span></a><span class="k2">(</span>GodClock, <span class="n">1</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

This statment makes the timer get called every millisecond right? There are 1000 milliseconds in a second right? So if I want to say simulate a year to equal 30 seconds, I could take</p><div class="source-code snippet"><div class="inner"><pre><span class="k2">(</span><span class="k1">int</span><span class="k2">)</span>CurrentTime<span class="k3">/</span><span class="n">30000</span>
</pre></div></div><p>

This would give me the year rught? Doesn&#39;t seem to work.</p><p>[EDIT]<br />It&#39;s in windowed mode, and it like I have to alt-tab back and forth for it to update.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Rick)</author>
		<pubDate>Sun, 25 Jul 2004 00:57:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>What is CurrentTime? How you got it? With <i>time</i>?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ReyBrujo)</author>
		<pubDate>Sun, 25 Jul 2004 01:16:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Actually I would open the windows clock to time when the year changed. But turns out the timer doesn&#39;t run when that window isn&#39;t the active window. So it works as long as it&#39;s the active window. I didn&#39;t know that.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Rick)</author>
		<pubDate>Sun, 25 Jul 2004 01:24:06 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Have you tried <i>set_display_switch_mode(SWITCH_BACKGROUND)</i> at the begining of your program, to keep the program running when not with focus?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ReyBrujo)</author>
		<pubDate>Sun, 25 Jul 2004 01:29:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Never used that before. I&#39;ll give that a try. </p><p>[EDIT]<br />Didn&#39;t work
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Rick)</author>
		<pubDate>Sun, 25 Jul 2004 01:34:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Then try SWITCH_BACKAMNESIA instead of the other. Let me see if I understand: You have your application running in a window. And it works only when the window has focus, when you give focus to something else, it loses it and the program stops, right?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ReyBrujo)</author>
		<pubDate>Sun, 25 Jul 2004 01:42:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>That&#39;s what I&#39;m thinking? I display the timer, and when someother window has focus the timer stops.</p><p>[EDIT]<br />That didn&#39;t work either. Where should that function be called? I put it right after allegro_init()
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Rick)</author>
		<pubDate>Sun, 25 Jul 2004 01:50:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>For Windows, use <i>set_display_switch_mode(SWITCH_BACKGROUND)</i>, but call it AFTER setting the graphic mode.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ReyBrujo)</author>
		<pubDate>Sun, 25 Jul 2004 02:01:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>perfect, thank you.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Rick)</author>
		<pubDate>Sun, 25 Jul 2004 02:04:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>For optimal results, you should do:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">if</span><span class="k2">(</span><a href="http://www.allegro.cc/manual/set_display_switch_mode" target="_blank"><span class="a">set_display_switch_mode</span></a><span class="k2">(</span>SWITCH_BACKAMNESIA<span class="k2">)</span> <span class="k3">=</span><span class="k3">=</span> <span class="k3">-</span><span class="n">1</span><span class="k2">)</span>
    <a href="http://www.allegro.cc/manual/set_display_switch_mode" target="_blank"><span class="a">set_display_switch_mode</span></a><span class="k2">(</span>SWITCH_BACKGROUND<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>In Windows, fullscreen modes will only work in the background with BACKAMNESIA, while windowed modes will only work with BACKGROUND. I&#39;m not sure, but I think there was talk about making BACKAMNESIA fall back onto BACKGROUND for newer Allegro versions (since it doesn&#39;t break anything by using BACKGROUND when BACKAMNESIA is requested). I&#39;ll have to ask about that.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Sun, 25 Jul 2004 06:01:35 +0000</pubDate>
	</item>
</rss>
