summaryrefslogtreecommitdiffstats
path: root/examples/statemachine
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-06-09 12:32:05 +0200
committerKent Hansen <khansen@trolltech.com>2009-06-09 12:32:05 +0200
commit2de2018a33ea45b32963378bb4f7ef24cd181485 (patch)
tree995af09686cb0dc486355ada41015c017fc63050 /examples/statemachine
parentd826a08add652314bb22bee44e0d43bbd672f272 (diff)
WinCE doesn't have time() function, use QTime
Diffstat (limited to 'examples/statemachine')
-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 d360de9453..2368608ebf 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);