title: gettimeofday() not declared in this scope - Cygwin
body: <p>Can cygwin make use of gettimeofday()? I'm getting the error:</p>
  
  <pre><code>lab8.cpp: In function ‘int main()’:
  lab8.cpp:62:30: error: ‘gettimeofday’ was not declared in this scope
       gettimeofday(&amp;start, NULL);
                                ^
  makefile:14: recipe for target 'lab8.o' failed
  make: *** [lab8.o] Error 1
  </code></pre>
  
  <p>I definitely included <code>&lt;sys/time.h&gt;</code>. Is there a package that I have to install or does it just not work on Windows?</p>
  
  <p>EDIT: Here's a simple test that yields the same error:</p>
  
  <pre><code>#include &lt;sys/time.h&gt;
  
  int main() {
      struct timeval start;
  
      gettimeofday(&amp;start, NULL);
  }
  </code></pre>
  
  <p>With the error:</p>
  
  <pre><code>$ g++ -c -Wall -g -std=c++11 test.cpp -o test.o
  test.cpp: In function ‘int main()’:
  test.cpp:6:30: error: ‘gettimeofday’ was not declared in this scope
       gettimeofday(&amp;start, NULL);
  </code></pre>