Socket.cpp   Socket.cpp 
skipping to change at line 26 skipping to change at line 26
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this library; if not, write to the Free Software along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, US A. Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, US A.
*/ */
#include "Socket.hpp" #include "Socket.hpp"
#include "StelCore.hpp"
#include "StelApp.hpp"
#include "StelUtils.hpp"
#ifdef Q_OS_WIN32 #ifdef Q_OS_WIN32
#include <windows.h> // GetSystemTimeAsFileTime #include <windows.h> // GetSystemTimeAsFileTime
#else #else
#include <sys/time.h> #include <sys/time.h>
#endif #endif
long long int GetNow(void) long long int GetNow(void)
{ {
long long int t;
StelCore *core = StelApp::getInstance().getCore();
#ifdef Q_OS_WIN32 #ifdef Q_OS_WIN32
union union
{ {
FILETIME file_time; FILETIME file_time;
__int64 t; __int64 t;
} tmp; } tmp;
GetSystemTimeAsFileTime(&tmp.file_time); GetSystemTimeAsFileTime(&tmp.file_time);
return (tmp.t/10) - 86400000000LL*(369*365+89); t = (tmp.t/10) - 86400000000LL*(369*365+89);
#else #else
struct timeval tv; struct timeval tv;
gettimeofday(&tv, 0); gettimeofday(&tv, 0);
return tv.tv_sec * 1000000LL + tv.tv_usec; t = tv.tv_sec * 1000000LL + tv.tv_usec;
#endif #endif
return t - core->getDeltaT(StelUtils::getJDFromSystem())*1000000; // Delta T anti-correction
} }
void Socket::hangup(void) void Socket::hangup(void)
{ {
if (!IS_INVALID_SOCKET(fd)) if (!IS_INVALID_SOCKET(fd))
{ {
close(fd); close(fd);
fd = INVALID_SOCKET; fd = INVALID_SOCKET;
} }
} }
 End of changes. 5 change blocks. 
2 lines changed or deleted 8 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/