| View previous topic :: View next topic |
| Author |
Message |
bbraun
Joined: 01 Jan 2005 Posts: 5
|
Posted: Tue Jan 04, 2005 7:42 am Post subject: getting the time on EE? |
|
|
| 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. |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Tue Jan 04, 2005 8:56 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Drakonite Site Admin

Joined: 17 Jan 2004 Posts: 989
|
Posted: Tue Jan 04, 2005 9:06 am Post subject: |
|
|
The RTC is attached to the CDVD controller which means getting the time from the EE is very slow and can be a hassle. _________________ Shoot Pixels Not People!
Makeshift Development |
|
| Back to top |
|
 |
|