PDA

View Full Version : [Librairie C][Classe C++] TimeManager version Finale



wraggster
May 4th, 2008, 19:19
News/release from Yan2yan (http://xtreamlua.com/modules.php?name=Forums&file=viewtopic&t=3792)


This is the final version of my lib TimeManager, which allows management easier time in C / C + +.

The problem with the C library is that you can not create a timer at a time, this is becoming embarrassing if one wants to create several. And that's where POO makes sense: C + +, it is no longer limited to a single timer, you can create as you want!


Downloads:

TimeManager - Lib C (http://www.zshare.net/download/115121677d7f5456/)
TimeManager - Class C + + (http://www.zshare.net/download/115121907363dfdb/)
TimeManager - Sample C (http://www.zshare.net/download/11512224e08d8d57/)

Note that I did not compile the C + +, because it can serve as a basis for understanding the POO
Also note that I still maintained the C lib, add a few new features listed below.

What's new?

-- Can stop the timer
-- The possibility of recovering the time in hours and minutes

With the C + +, you are no longer limited to a single timer

How you use them?

In C, eboot an example, as well as the header should be sufficient to understand the workings

In C + +, it must first include the header:

Code:
# include "timeManager.h"


Then, out of loop, we create our purpose timer:

Code:
timer_TimeManager Timer;


Then you will have access to all available functions in the header:

Code:
Void timer_start ();
Void timer_stop ();
Void timer_reset ();
Void timer_startPause ();
Void timer_endPause ();
u64 timer_getTimeMicroSec ();
u64 timer_getTimeMilliSec ();
u64 timer_getTimeSec ();
u64 timer_getTimeMin ();
u64 timer_getTimeHours ();


It is used as follows:

Code:
Timer.timer_start ();


And so on ...