title: C: static struct
body: <p>I am fairly new to C and am going over some code to learn about hashing.</p>
  
  <p>I came across a file that contained the following lines of code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdbool.h&gt;
  #include &lt;stdint.h&gt;
  #include &lt;stdlib.h&gt;
  
  #include &lt;time.h&gt;
  #include &lt;sys/time.h&gt;
  
  // ---------------------------------------------------------------------------
  
  int64_t timing(bool start)
  {
      static      struct timeval startw, endw; // What is this?
      int64_t     usecs   = 0;
  
      if(start) {
          gettimeofday(&amp;startw, NULL);
      }
      else {
          gettimeofday(&amp;endw, NULL);
          usecs   =
                 (endw.tv_sec - startw.tv_sec)*1000000 +
                 (endw.tv_usec - startw.tv_usec);
      }
      return usecs;
  }
  </code></pre>
  
  <p>I have never come across a static struct defined in this manner before. Usually a struct is preceded by the definition/declaration of the struct. However, this just seems to state there are going to be static struct variables of type timeval, startw, endw.</p>
  
  <p>I have tried to read up on what this does but have not yet found a good enough explanation. Any help?</p>