<p>This ticket comes out of <a href="https://github.com/mlpack/mlpack/issues/422" class="issue-link" title="Error Compiling Triangular_kernel.hpp on Windows">#422</a>.</p>

<p>Right now, on Windows, the header <code>&lt;windows.h&gt;</code> is included inside of <code>src/mlpack/core/util/timers.hpp</code> for the use of the <code>timeval</code> struct.  Because of the huge overhead that <code>windows.h</code> incurs when it is included, this can slow down compilation a fair amount (which is already slow because we are using complex template functionality of C++).</p>

<p>We can reduce this overhead significantly by refactoring <code>timers.hpp</code> and <code>timers.cpp</code> such that the <code>timeval</code> struct is not necessary in <code>timers.hpp</code> and instead used entirely within <code>timers.cpp</code>.  This should be a relatively easy refactoring job for someone who would like to make a first contribution to the library.</p>

<p>Thanks to theSundayProgrammer for pointing this issue out.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/issues/425">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFJUg4cjOpMdKYuKvRZGL0FUqOR4Eks5n3QcJgaJpZM4DyZLL.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/mlpack/mlpack/issues/425"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>