TelescopeClient.cpp   TelescopeClient.cpp 
skipping to change at line 43 skipping to change at line 43
#include <cmath> #include <cmath>
#include <QDebug> #include <QDebug>
#include <QHostAddress> #include <QHostAddress>
#include <QHostInfo> #include <QHostInfo>
#include <QRegExp> #include <QRegExp>
#include <QString> #include <QString>
#include <QTcpSocket> #include <QTcpSocket>
#include <QTextStream> #include <QTextStream>
#ifdef Q_OS_WIN32 #ifdef Q_OS_WIN
#include <windows.h> // GetSystemTimeAsFileTime() #include <windows.h> // GetSystemTimeAsFileTime()
#else #else
#include <sys/time.h> #include <sys/time.h>
#endif #endif
TelescopeClient *TelescopeClient::create(const QString &url) TelescopeClient *TelescopeClient::create(const QString &url)
{ {
// example url: My_first_telescope:TCP:J2000:localhost:10000:500000 // example url: My_first_telescope:TCP:J2000:localhost:10000:500000
// split to: // split to:
// name = My_first_telescope // name = My_first_telescope
skipping to change at line 148 skipping to change at line 148
//! returns the current system time in microseconds since the Epoch //! returns the current system time in microseconds since the Epoch
//! Prior to revision 6308, it was necessary to put put this method in an //! Prior to revision 6308, it was necessary to put put this method in an
//! #ifdef block, as duplicate function definition caused errors during sta tic //! #ifdef block, as duplicate function definition caused errors during sta tic
//! linking. //! linking.
qint64 getNow(void) qint64 getNow(void)
{ {
// At the moment this can't be done in a platform-independent way with Qt // At the moment this can't be done in a platform-independent way with Qt
// (QDateTime and QTime don't support microsecond precision) // (QDateTime and QTime don't support microsecond precision)
qint64 t; qint64 t;
//StelCore *core = StelApp::getInstance().getCore(); //StelCore *core = StelApp::getInstance().getCore();
#ifdef Q_OS_WIN32 #ifdef Q_OS_WIN
FILETIME file_time; FILETIME file_time;
GetSystemTimeAsFileTime(&file_time); GetSystemTimeAsFileTime(&file_time);
t = (*((__int64*)(&file_time))/10) - 86400000000LL*134774; t = (*((__int64*)(&file_time))/10) - 86400000000LL*134774;
#else #else
struct timeval tv; struct timeval tv;
gettimeofday(&tv,0); gettimeofday(&tv,0);
t = tv.tv_sec * 1000000LL + tv.tv_usec; t = tv.tv_sec * 1000000LL + tv.tv_usec;
#endif #endif
// GZ JDfix for 0.14 I am 99.9% sure we no longer need the anti-corr ection // GZ JDfix for 0.14 I am 99.9% sure we no longer need the anti-corr ection
//return t - core->getDeltaT(StelUtils::getJDFromSystem())*1000000; // Delta T anti-correction //return t - core->getDeltaT(StelUtils::getJDFromSystem())*1000000; // Delta T anti-correction
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 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/