From 2de2018a33ea45b32963378bb4f7ef24cd181485 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Tue, 9 Jun 2009 12:32:05 +0200 Subject: WinCE doesn't have time() function, use QTime --- examples/statemachine/tankgameplugins/random_ai/random_ai_plugin.cpp | 5 ++--- 1 file 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 +#include #include -#include - QState *RandomAiPlugin::create(QState *parentState, QObject *tank) { - qsrand(uint(time(NULL))); + qsrand(QTime(0,0,0).secsTo(QTime::currentTime())); QState *topLevel = new QState(parentState); -- cgit v0.12