TelescopeClient.cpp   TelescopeClient.cpp 
skipping to change at line 146 skipping to change at line 146
} }
//! 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;
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);
return (*((__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);
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
} }
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),
tcpSocket(new QTcpSocket()), tcpSocket(new QTcpSocket()),
equinox(eq) equinox(eq)
{ {
hangup(); hangup();
// Example params: // Example params:
 End of changes. 4 change blocks. 
2 lines changed or deleted 5 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/