title: glibmm timeout signal
body: <p>I'm working on a plugin for a smaller application using gtkmm. The plugin I'm working on checks certain conditions (the date had changed and a new day started) after every minute and starts some actions if the conditions are true. In the initialization part of the plugin I have the following piece of code that uses Glib::SignalTimeout and sigc++:</p>
  
  <pre><code>testCounter = 0;
  sigc::slot&lt;bool&gt; tslot = sigc::mem_fun(*this, 
                 &amp;NoteOfDayFactory::checkNewDay);
  timeoutObj = Glib::signal_timeout()
                .connect(tslot,CHECK_INTERVAL);
  </code></pre>
  
  <p>where testCounter is an attribute defined in the class that contains the initialization method and CHECK_INTERVAL is a constant equal to 1 minute. All the other variables present are defined in the class that contains the initialization code and the callback method.
  The checkNewDay method is where the condition is tested and action taken if the day had changed:</p>
  
  <pre><code>bool NoteOfDayFactory::checkNewDay() {
      std::cout &lt;&lt; "Checking for new day every minute or so" &lt;&lt; std::endl;
      std::cout &lt;&lt; "Before incrementing" &lt;&lt; std::endl;
      for(int i = 0; i &lt; 100000; i++);
      counter++;
      std::cout &lt;&lt; counter &lt;&lt; " minutes elapsed" &lt;&lt; std::endl;
      return true; }
  </code></pre>
  
  <p>I put the small test code, presented above, before I used the real action, to test if everything goes well and the checkNewDay isn't called more than once every minute.
  What I found puzzle me. After every minute elapses I get a number of let say 10 messages (at least) printed on the stdout but the variable increases only once every minute.</p>
  
  <p>****** snip ****</p>
  
  <p>Checking for new day every minute or so</p>
  
  <p>Before incrementing</p>
  
  <p>1 minutes elapsed</p>
  
  <p>Checking for new day every minute or so</p>
  
  <p>Before incrementing</p>
  
  <p>1minutes elapsed</p>
  
  <p>**** snip ****</p>
  
  <p>Checking for new day every minute or so</p>
  
  <p>Before incrementing</p>
  
  <p>2 minutes elapsed</p>
  
  <p>Checking for new day every minute or so</p>
  
  <p>Before incrementing</p>
  
  <p>2 minutes elapsed</p>
  
  <p>**** snip ******</p>
  
  <p>It behaves like the text was sent to 10 (or so) different buffers and printed out at once after every minute. Could somebody enlighten me and help me understand why is this happening, because I'm pretty sure that the callback is called only once every minute. Thank you!</p>