Setting up a timer

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Vixe
Posts: 1
Joined: Mon May 17, 2004 1:12 am

Setting up a timer

Post by Vixe »

Hiyas, I am new to this engine and not a very good programmer :oops:

I am trying to settingup a timer, and my code looks like

irr::Itimer* timer = device->getTimer();

u32 now = timer->getTime();

However, it would give me the ememory violation error. on the second line.
it seems like the Itimer is not a class?
I guess it's more like a programming problem.

could anyone teach me how to set this right and to use the getTime() function?

thanks alot :wink:
c_olin3404
Posts: 67
Joined: Fri Jan 23, 2004 5:04 am

Post by c_olin3404 »

I just did something like this:

Code: Select all


u32 lastTime = device->getTime();

if(device->getTime() > lastTime + 1000) //if one second has past
    doWateva();
Post Reply