Page 1 of 1
getting the time on EE?
Posted: Tue Jan 04, 2005 7:42 am
by bbraun
Is there a way to get the time on the EE with the ps2sdk? I see several timer functions, but nothing for either getting the current time, or for measuring the passage of time. I noticed in the iop/ sub directory there is a getPs2Time() in libhdd, and a GetSystemTime() in kernel but I am unsure of their relation to the EE code.
Posted: Tue Jan 04, 2005 8:56 am
by Shine
You can use the timer:
http://forums.ps2dev.org/viewtopic.php?t=878 It has an resolution of about 2 us and counts 113 ms, if setting with the maximum divider of system clock / 256.
In CVS are another nice functions for using the internal EE performance counters:
http://cvs.ps2dev.org/ps2Perf/
If you have 300 ms time to read the clock and if you need the realtime clock, you can use the cdReadClock, but I don't have example code for it.
Posted: Tue Jan 04, 2005 9:06 am
by Drakonite
The RTC is attached to the CDVD controller which means getting the time from the EE is very slow and can be a hassle.