summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-06-09 10:32:05 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-06-09 10:32:05 (GMT)
commit2de2018a33ea45b32963378bb4f7ef24cd181485 (patch)
tree995af09686cb0dc486355ada41015c017fc63050 /examples
parentd826a08add652314bb22bee44e0d43bbd672f272 (diff)
downloadQt-2de2018a33ea45b32963378bb4f7ef24cd181485.zip
Qt-2de2018a33ea45b32963378bb4f7ef24cd181485.tar.gz
Qt-2de2018a33ea45b32963378bb4f7ef24cd181485.tar.bz2
WinCE doesn't have time() function, use QTime
Diffstat (limited to 'examples')
-rw-r--r--examples/statemachine/tankgameplugins/random_ai/random_ai_plugin.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/statemachine/tankgameplugins/random_ai/random_ai_plugin.cpp b/examples/statemachine/tankgameplugins/random_ai/random_ai_plugin.cpp
index d360de9..2368608 100644
--- a/examples/statemachine/tankgameplugins/random_ai/random_ai_plugin.cpp
+++ b/examples/statemachine/tankgameplugins/random_ai/random_ai_plugin.cpp
@@ -42,13 +42,12 @@
#include "random_ai_plugin.h"
#include <QState>
+#include <QTime>
#include <QtPlugin>
-#include <time.h>
-
QState *RandomAiPlugin::create(QState *parentState, QObject *tank)
{
- qsrand(uint(time(NULL)));
+ qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
QState *topLevel = new QState(parentState);