I initilized the counter like this: (copied this from one of the examples in the SDK)
And polled the counter like this multiple times inside my main loop:EnterCriticalSection();
SetRCnt( RCntCNT2, 0xffff, RCntMdNOINTR );
SetRCnt(RCntCNT2, 0xffff, RCntMdNOINTR|RCntMdFR);
StartRCnt( RCntCNT2 );
ExitCriticalSection();
I've only tested this on emulators, but I'm getting values that I'm not sure are correct. Every time I call GetRCnt, does it reset the counter? Because I get values at the start that are larger than the values at the end of the frame.// Player and Camera movement code here
prof_logic = GetRCnt(RCntCNT2);
// BG&Player model transformation and drawing code here
prof_transform = GetRCnt(RCntCNT2);
// Other stuff code here
prof_frame_end = GetRCnt(RCntCNT2);
ResetRCnt(RCntCNT2);
Is this the way I'm supposed to use the counter or I am doing something wrong?