How do I make a cooldown timer for a condition in C?
<p>I'm currently working on a project for college and I've come across a problem that I can't seem to fix. I'm trying to create a cooldown for a certain condicional action in a permanent loop. I've been trying using the time function, but it doesn't work.</p>

<pre><code>    time_t timer1, timer2;

    timer2 = time(NULL) -1;

    while(1)
    {
       timer1 = time(NULL);

       if( ... &amp;&amp; timer1 &gt;= timer2 +1)
       {
         ...
         timer2 = timer1;
       }
    }
</code></pre>