Convert std::chrono::system_clock::time_point to struct timeval and back : <p>I´m writing a C++ code that needs to access an old C library that uses timeval as a representation of the current time.</p>

<p>In the old package to get the current date/time we used:</p>

<pre><code>struct timeval dateTime;
gettimeofday(&amp;dateTime, NULL);

function(dateTime); // The function will do its task
</code></pre>

<p>Now I need to use C++ chrono, something as:</p>

<pre><code>    system_clock::time_point now = system_clock::now();
    struct timeval dateTime;

    dateTime.tv_sec = ???? // Help appreaciated here
    dateTime.tv_usec = ???? // Help appreaciated here

    function(dateTime);
</code></pre>

<p>Later in code I need the way back, building a <code>time_point</code> variable from the returned <code>struct timeval</code>:</p>

<pre><code>    struct timeval dateTime;
    function(&amp;dateTime);

    system_clock::time_point returnedDateTime = ?? // Help appreacited
</code></pre>

<p>I´m using C++11. </p>
