projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add demo application.
[bertos.git]
/
drv
/
timer_qt.c
diff --git
a/drv/timer_qt.c
b/drv/timer_qt.c
index a9e38be6a6141472e5b1172579ca401cc530f519..c6ff698f0261d8b2110131d9e1b5fc16c622543d 100755
(executable)
--- a/
drv/timer_qt.c
+++ b/
drv/timer_qt.c
@@
-14,6
+14,12
@@
/*#*
*#* $Log$
/*#*
*#* $Log$
+ *#* Revision 1.3 2006/02/21 21:28:02 bernie
+ *#* New time handling based on TIMER_TICKS_PER_SEC to support slow timers with ticks longer than 1ms.
+ *#*
+ *#* Revision 1.2 2006/02/20 02:01:35 bernie
+ *#* Port to Qt 4.1.
+ *#*
*#* Revision 1.1 2005/11/27 03:06:36 bernie
*#* Qt timer emulation.
*#*
*#* Revision 1.1 2005/11/27 03:06:36 bernie
*#* Qt timer emulation.
*#*
@@
-22,8
+28,13
@@
#include <cfg/compiler.h> /* hptime.t */
// Qt headers
#include <cfg/compiler.h> /* hptime.t */
// Qt headers
-#include <qdatetime.h>
-#include <qtimer.h>
+#if _QT < 4
+ #include <qdatetime.h>
+ #include <qtimer.h>
+#else
+ #include <QtCore/QDateTime>
+ #include <QtCore/QTimer>
+#endif
// The user interrupt server routine
// The user interrupt server routine
@@
-70,9
+81,9
@@
public:
// Record initial time
system_time.start();
// Record initial time
system_time.start();
- // Activate
1ms
timer interrupt
+ // Activate timer interrupt
timer.connect(&timer, SIGNAL(timeout()), this, SLOT(timerInterrupt()));
timer.connect(&timer, SIGNAL(timeout()), this, SLOT(timerInterrupt()));
- timer.start(1);
+ timer.start(1
000 / TIMER_TICKS_PER_SEC
);
initialized = true;
}
initialized = true;
}