TelescopeClient.cpp   TelescopeClient.cpp 
skipping to change at line 147 skipping to change at line 147
//! 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_WIN32
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
return t - core->getDeltaT(StelUtils::getJDFromSystem())*1000000; // // GZ JDfix for 0.14 I am 99.9% sure we no longer need the anti-corr
Delta T anti-correction ection
//return t - core->getDeltaT(StelUtils::getJDFromSystem())*1000000;
// Delta T anti-correction
return t;
} }
TelescopeTCP::TelescopeTCP(const QString &name, const QString &params, Equi nox eq) TelescopeTCP::TelescopeTCP(const QString &name, const QString &params, Equi nox eq)
: TelescopeClient(name) : TelescopeClient(name)
, port(0) , port(0)
, tcpSocket(new QTcpSocket()) , tcpSocket(new QTcpSocket())
, end_of_timeout(0) , end_of_timeout(0)
, time_delay(0) , time_delay(0)
, equinox(eq) , equinox(eq)
{ {
 End of changes. 2 change blocks. 
3 lines changed or deleted 6 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/