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!
TimeManager - Lib C
TimeManager - Class C + +
TimeManager - Sample C
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.
-- 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:
# include "timeManager.h"
Then, out of loop, we create our purpose timer:
Then you will have access to all available functions in the header:
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:
And so on ...