summaryrefslogtreecommitdiff
path: root/src/sensors/qsensor.cpp
diff options
context:
space:
mode:
authorLincoln Ramsay <lincoln.ramsay@nokia.com>2011-08-01 13:16:02 +1000
committerQt by Nokia <qt-info@nokia.com>2011-08-01 05:20:26 +0200
commitc5a4a7a7a9565a29fa70f1bc858f9a3628c237b4 (patch)
tree197f96b96227cee741716075831ae42a9092e3c3 /src/sensors/qsensor.cpp
parent22260646a9fa7dffbd506b6bdd2586ad3d4d3556 (diff)
downloadqtsensors-c5a4a7a7a9565a29fa70f1bc858f9a3628c237b4.tar.gz
remove qtimestamp
Just use a quint64. Not binary compatible but source compatible. Change-Id: I240baeef905744f844f3c37b2739fd9a6562af15 Reviewed-on: http://codereview.qt.nokia.com/2412 Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
Diffstat (limited to 'src/sensors/qsensor.cpp')
-rw-r--r--src/sensors/qsensor.cpp34
1 files changed, 12 insertions, 22 deletions
diff --git a/src/sensors/qsensor.cpp b/src/sensors/qsensor.cpp
index 2658d22..62691c8 100644
--- a/src/sensors/qsensor.cpp
+++ b/src/sensors/qsensor.cpp
@@ -50,24 +50,6 @@
QT_BEGIN_NAMESPACE
/*!
- \typedef qtimestamp
- \relates QSensor
-
- Sensor timestamps are represented by this typedef which is a 64 bit unsigned integer.
-
- Timestamps values are microseconds since a fixed point.
- You can use timestamps to see how far apart two sensor readings are.
-
- Note that sensor timestamps from different sensors may not be directly
- comparable (as they may choose different fixed points for their reference).
-
- \bold{Note that some platforms do not deliver timestamps correctly}.
- Applications should be prepared for occasional issues that cause timestamps to jump
- forwards or backwards. The \l{sensors-api.html#platform-notes}{platform notes} have
- more details.
-*/
-
-/*!
\typedef qrange
\relates QSensor
@@ -161,7 +143,6 @@ QT_BEGIN_NAMESPACE
*/
// A bit of a hack to call qRegisterMetaType when the library is loaded.
-static int qtimestamp_id = qRegisterMetaType<qtimestamp>("qtimestamp");
static int qrange_id = qRegisterMetaType<qrange>("qrange");
static int qrangelist_id = qRegisterMetaType<qrangelist>("qrangelist");
static int qoutputrangelist_id = qRegisterMetaType<qoutputrangelist>("qoutputrangelist");
@@ -837,13 +818,22 @@ QSensorReading::~QSensorReading()
\property QSensorReading::timestamp
\brief the timestamp of the reading.
- \sa qtimestamp
+ Timestamps values are microseconds since a fixed point.
+ You can use timestamps to see how far apart two sensor readings are.
+
+ Note that sensor timestamps from different sensors may not be directly
+ comparable (as they may choose different fixed points for their reference).
+
+ \bold{Note that some platforms do not deliver timestamps correctly}.
+ Applications should be prepared for occasional issues that cause timestamps to jump
+ forwards or backwards. The \l{sensors-api.html#platform-notes}{platform notes} have
+ more details.
*/
/*!
Returns the timestamp of the reading.
*/
-qtimestamp QSensorReading::timestamp() const
+quint64 QSensorReading::timestamp() const
{
return d->timestamp;
}
@@ -851,7 +841,7 @@ qtimestamp QSensorReading::timestamp() const
/*!
Sets the \a timestamp of the reading.
*/
-void QSensorReading::setTimestamp(qtimestamp timestamp)
+void QSensorReading::setTimestamp(quint64 timestamp)
{
d->timestamp = timestamp;
}