title: Software delay using C
body: <p>This code just calculates the software delay but whenever I try running the code it throws the following errors.Thanks in advance
  error: called object is not a function or function pointer
  error:expected identifier or '(' before numeric constant</p>
  <pre><code> #include&lt;stdio.h&gt;
   #define delay 12800
   
  struct my_time
  {
      int seconds;
      int minutes;
      int hours;
  };
  void display(struct my_time *t);
  void delay(void);
  void update(struct my_time *t);
      
  int main()
  {
      struct my_time systime;
      systime.hours=0;
      systime.minutes=0;
      systime.seconds=0;
      
      while (1)
      {
          update(&amp;systime);
          display(&amp;systime);
      }
  
      return 0;
  }
      
  void update(struct my_time *t){
      t-&gt;seconds++;
      if(t-&gt;seconds==60){
          t-&gt;seconds=0;
          t-&gt;minutes++;
      }
      if(t-&gt; minutes==60){
          t-&gt;minutes=0;
          t-&gt;hours++;
      }
      if(t-&gt;hours==24) t-&gt;hours=0;
      
      delay();
  }
      
  void display(struct my_time *t){
      
      printf(&quot;%02d: &quot;, t-&gt;hours);
      printf(&quot;%02d:&quot;,t-&gt;minutes);
      printf(&quot;%02d\n&quot;,t-&gt;seconds);
  }
      
  void delay(void){
      long int t;
      for(t=0;t&lt;delay;t++);
  }
  </code></pre>