C/C++ >> Background timer...
Posted by kpyro on 03:08:00 05-29-2002
Is there a way to time a program? I am making a game where you have ten minutes to finish, and if you don't finish in ten minutes, the mafia come blow up your house 'cuz you owe them money. How could I get this accomplished? [addsig]
Posted by KaGez on 13:26:00 05-29-2002
maybe you can look at the code snippet I submitted about time.h. That should help you, and I think it will also solve your problem
[addsig]
Posted by dxprog on 22:57:00 05-29-2002
Also depends on what you're programming it in. I mean WIndows, Dx. Both have timer APIs built in. I am not sure how to access the Dx timer in C but you can set one up in WinAPI when initializing the window class. [addsig]
Posted by Flikm on 23:15:00 05-29-2002
SDL has SDL_GetTicks() or something, but i dont think you want to pick up SDL just for one little task. if you are already using SDL ....
Posted by kpyro on 01:08:00 05-30-2002
FYI: I am programming in Windows with the Microsoft compiler. [addsig]
Posted by dxprog on 03:20:00 05-30-2002
Is it a Windows app though? I mean is there a window or is it Dx or OpenGL. What API are you using? [addsig]
Posted by kpyro on 07:16:00 05-30-2002
No api, just a plain old console. [addsig]
Posted by dxprog on 09:21:00 05-30-2002
If you want I can fire off the program code to you. [addsig]
Posted by KaGez on 21:39:00 05-30-2002
if you wanna go for the console, I'll say it again:
read through my code snippet...
it's covering exactly _that_
[addsig]
Posted by kpyro on 02:45:00 05-31-2002
dxprog: Shoot it at me.
Posted by MoX on 03:34:00 05-31-2002
KaGez: They are ignoring you [addsig]
Posted by dxprog on 06:45:00 05-31-2002
kpyro: Okay. I'll get it pulled together. [addsig]
Posted by kpyro on 07:13:00 05-31-2002
No, I am not ignoring KaGeZ, I would just like to see the code here instead of go getting it I am lazy.
Posted by Flikm on 12:14:00 05-31-2002
be productive, depend on yourself!
Posted by KaGez on 20:33:00 05-31-2002
http://www.youngprogrammers.net/showdoc.php?id=230
There you go if it makes you happy
[addsig]
Posted by kpyro on 07:20:00 06-01-2002
Better!
Posted by kpyro on 07:23:00 06-01-2002
Err...Um...gz.... [addsig]
Posted by KaGez on 12:11:00 06-01-2002
Quote:
On 2002-06-01 07:23, kpyro wrote:
Err...Um...gz....



What? :/
[addsig]