<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.newlc.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>NewLC - Using CTimer???? - Comments</title>
 <link>http://www.newlc.com/en/topic-606</link>
 <description>Comments for &quot;Using CTimer????&quot;</description>
 <language>en</language>
<item>
 <title>Re: Using CTimer????</title>
 <link>http://www.newlc.com/en/topic-606#comment-4653</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;-Call your draw &amp;nbsp;here (to show a splash image)&lt;br /&gt;-Call StartTimer()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// After Splash bilden &lt;br /&gt;void CAAppUi::StartTimer()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp;if(iPeriodic) StopTimer();&lt;br /&gt;// How long the splash will be viewd&lt;br /&gt; &amp;nbsp; &amp;nbsp;const TInt tickInterval=3000000; &lt;br /&gt; &amp;nbsp; &amp;nbsp;iPeriodic=CPeriodic::NewL(0); &lt;br /&gt; &amp;nbsp; &amp;nbsp;iPeriodic-&amp;gt;Start(tickInterval,tickInterval,TCallBack(Tick, this));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;void CAAppUi::StopTimer()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp;if(iPeriodic)&lt;br /&gt; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iPeriodic-&amp;gt;Cancel();&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;delete iPeriodic;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iPeriodic = NULL;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;br /&gt;// This method must be protected in your header file&lt;br /&gt;TInt CAAppUi::Tick(TAny* aObject)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp;return ((CAAppUi*)aObject)-&amp;gt;DoTick();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;TInt CAAppUi::DoTick()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt; &amp;nbsp; &amp;nbsp;// Go on and start the rest of your program&lt;br /&gt; &amp;nbsp; &amp;nbsp;return 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;br /&gt;/Fadi&lt;/div&gt;</description>
 <pubDate>Tue, 16 Dec 2003 15:29:10 +0100</pubDate>
 <dc:creator>Fadi Abbas</dc:creator>
 <guid isPermaLink="false">comment 4653 at http://www.newlc.com</guid>
</item>
<item>
 <title>Using CTimer????</title>
 <link>http://www.newlc.com/en/topic-606#comment-4652</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Yes, it happens. But I did not yet understand when this happens.&lt;br /&gt;I used to have the problem some weeks ago but I cannot reproduce it.&lt;br /&gt;And I have not found any solution in phpbb to solve this.&lt;br /&gt;&lt;br /&gt;Sorry for the inconvenience.&lt;br /&gt;Eric&lt;/div&gt;</description>
 <pubDate>Tue, 21 Oct 2003 09:13:18 +0200</pubDate>
 <dc:creator>eric</dc:creator>
 <guid isPermaLink="false">comment 4652 at http://www.newlc.com</guid>
</item>
<item>
 <title>Using CTimer????</title>
 <link>http://www.newlc.com/en/topic-606#comment-4651</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Has anyone else noticed that the forum often posts you as guest rather than the user you are logged in as?&lt;/div&gt;</description>
 <pubDate>Tue, 21 Oct 2003 09:07:38 +0200</pubDate>
 <dc:creator>fwadman</dc:creator>
 <guid isPermaLink="false">comment 4651 at http://www.newlc.com</guid>
</item>
<item>
 <title>Using CTimer????</title>
 <link>http://www.newlc.com/en/topic-606#comment-4650</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Hope this helps .... (uses CPeriodic but I guess CTimer would work just fine ...) &amp;nbsp;Please post back here if it does work!&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;codeheader&quot;&gt;Code:&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;// Start the timer &amp;#40;this is set to 100ms&amp;#41;&lt;br /&gt;void MyClass&amp;#58;&amp;#58;start&amp;#40;&amp;#41; &amp;#123;&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;if&amp;#40;timer==0&amp;#41; &amp;#123;&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;timer=CPeriodic&amp;#58;&amp;#58;New&amp;#40;CActive&amp;#58;&amp;#58;EPriorityStandard&amp;#41;;&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;timer-&amp;gt;Start&amp;#40;TTimeIntervalMicroSeconds32&amp;#40;100000&amp;#41;,TTimeIntervalMicroSeconds32&amp;#40;100000&amp;#41;,TCallBack&amp;#40;TimeTick,this&amp;#41;&amp;#41;;&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;#125;&lt;br /&gt;&amp;#125;&lt;br /&gt;&lt;br /&gt;// Method in MyClass which will get called by the TimeTick function when the timer goes off&lt;br /&gt;void MyClass&amp;#58;&amp;#58;tick&amp;#40;&amp;#41; &amp;#123;&lt;br /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Do whatever&lt;br /&gt;&amp;#125;&lt;br /&gt;&lt;br /&gt;// Global function which simply passes the timer tick back to MyClass&lt;br /&gt;TInt TimeTick&amp;#40;TAny *obj&amp;#41; &amp;#123;&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;#40;&amp;#40;MyClass *&amp;#41;obj&amp;#41;-&amp;gt;tick&amp;#40;&amp;#41;;&lt;br /&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;return 0;&lt;br /&gt;&amp;#125;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Tue, 21 Oct 2003 09:06:34 +0200</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 4650 at http://www.newlc.com</guid>
</item>
<item>
 <title>Using CTimer????</title>
 <link>http://www.newlc.com/en/topic-606</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/en/topic-606&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/en/topic-606#comments</comments>
 <category domain="http://www.newlc.com/en/forums/symbian-c">Symbian C++</category>
 <pubDate>Tue, 21 Oct 2003 08:56:26 +0200</pubDate>
 <dc:creator>fullscale</dc:creator>
 <guid isPermaLink="false">1681 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
