#endif
#include <iostream>
#include <msp/strings/format.h>
+#include <msp/time/rawtime_private.h>
#include <msp/time/units.h>
#include "socket.h"
void Socket::set_timeout(const Time::TimeDelta &timeout)
{
#ifndef WIN32
- timeval tv;
- timeout.fill_timeval(tv);
+ timeval tv = Time::rawtime_to_timeval(timeout.raw());
set_option(SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(timeval));
set_option(SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(timeval));
#else