Hi,
i would like to get current tick or any elapsed time available.
a fine granularity is welcome
thx
ticks or any timer?
Re: ticks or any timer?
I use the NDS timers to do that, just set one of the timers to 1000Hz and it should be able to give you a good representation of the current ms tick.
I made a simple class to wrap the "Tick" manipulation that I'm willing to share, if you want it
I made a simple class to wrap the "Tick" manipulation that I'm willing to share, if you want it
try, crash, debug and learn
Re: ticks or any timer?
Thanks for the answer!
and using gettick() function is just was i was searching for..
as i'm completely lazy i'm also using this copy/pasted macro :
#define OS_BUS_CLOCK 243000000u
#define OS_TIMER_CLOCK (OS_BUS_CLOCK/4)
#define OSTicksToMilliseconds( ticks ) ((ticks) / (OS_TIMER_CLOCK / 1000))
maybe it's completely wrong, maybe not. i'll test it later on. ^^
and using gettick() function is just was i was searching for..
as i'm completely lazy i'm also using this copy/pasted macro :
#define OS_BUS_CLOCK 243000000u
#define OS_TIMER_CLOCK (OS_BUS_CLOCK/4)
#define OSTicksToMilliseconds( ticks ) ((ticks) / (OS_TIMER_CLOCK / 1000))
maybe it's completely wrong, maybe not. i'll test it later on. ^^
Who is online
Users browsing this forum: No registered users and 4 guests