title: Correct sleep function of libltc
body: <p>I am playing around with libLTC to generate timecode. I have a rough working example below:</p>
  <pre><code>#include &lt;curses.h&gt;
  #include &lt;time.h&gt;
  #include &lt;ltc.h&gt;
  
  int main() {
      initscr();
      nodelay(stdscr, TRUE);
      LTCFrame frame;
      LTCFrameExt Frame;
      SMPTETimecode stime;
  
      do {
          clear();
          ltc_frame_increment(&amp;frame, 25, LTC_TV_625_50, LTC_USE_DATE);
          ltc_frame_to_time(&amp;stime, &amp;frame, LTC_USE_DATE);
          printw(&quot;%02d:%02d:%02d%c%02d | %8lld %8lld%s\n&quot;,
                 stime.hours,
                 stime.mins,
                 stime.secs,
                 (Frame.ltc.dfbit) ? '.' : ':',
                 stime.frame,
                 Frame.off_start,
                 Frame.off_end,
                 Frame.reverse ? &quot;  R&quot; : &quot;&quot;
          );
  
          refresh();
      } while (getch() != 'q');
  
      endwin();
      return 0;
  }
  
  </code></pre>
  <p>The issue I have currently is that the loop runs too fast and as a result so does the TC, I wondered what the correct way to slow this down so that it runs at the correct rate? There is the sleep() function but would need to change for each frame rate?</p>