<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: C Reference  function difftime()</title>
	<atom:link href="http://www.codingunit.com/c-reference-time-h-function-difftime/feed" rel="self" type="application/rss+xml" />
	<link>http://www.codingunit.com/c-reference-time-h-function-difftime</link>
	<description>CodingUnit is your online resource for learning to program. Tutorials on C, C++, PHP, Python, MySQL, Java, JQuery, Opengl, DirectX and much more!</description>
	<lastBuildDate>Mon, 06 Feb 2012 06:08:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Lutz Pansegrau</title>
		<link>http://www.codingunit.com/c-reference-time-h-function-difftime/comment-page-1#comment-3805</link>
		<dc:creator>Lutz Pansegrau</dc:creator>
		<pubDate>Thu, 29 Sep 2011 22:24:31 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=467#comment-3805</guid>
		<description>Thanks for the example.

Some C programmer struggling to produce a simple time delay (in seconds).

Here my example:

#include 

void delay(int sec);    /* Function declaration */


int main()
{
    ....
    delay (3)  /* sec = 3 seconds delay */
    ....
    
    return 0;
}


/* Time delay function definition */

void delay(int s)
{
    time_t time1,time2;    /* declare timer */

    time (&amp;time1);    /* initialize both timer */
    time (&amp;time2);

    while (difftime (time2,time1) &lt;= s)   /* Loop until time difference is equal to s seconds */
        time (&amp;time2);

}


Regards

Lutz Pansegrau</description>
		<content:encoded><![CDATA[<p>Thanks for the example.</p>
<p>Some C programmer struggling to produce a simple time delay (in seconds).</p>
<p>Here my example:</p>
<p>#include </p>
<p>void delay(int sec);    /* Function declaration */</p>
<p>int main()<br />
{<br />
    &#8230;.<br />
    delay (3)  /* sec = 3 seconds delay */<br />
    &#8230;.</p>
<p>    return 0;<br />
}</p>
<p>/* Time delay function definition */</p>
<p>void delay(int s)<br />
{<br />
    time_t time1,time2;    /* declare timer */</p>
<p>    time (&amp;time1);    /* initialize both timer */<br />
    time (&amp;time2);</p>
<p>    while (difftime (time2,time1) &lt;= s)   /* Loop until time difference is equal to s seconds */<br />
        time (&amp;time2);</p>
<p>}</p>
<p>Regards</p>
<p>Lutz Pansegrau</p>
]]></content:encoded>
	</item>
</channel>
</rss>

