forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

getting the time on EE?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
bbraun



Joined: 01 Jan 2005
Posts: 5

PostPosted: Tue Jan 04, 2005 7:42 am    Post subject: getting the time on EE? Reply with quote

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
View user's profile Send private message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Tue Jan 04, 2005 8:56 am    Post subject: Reply with quote

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
View user's profile Send private message
Drakonite
Site Admin


Joined: 17 Jan 2004
Posts: 989

PostPosted: Tue Jan 04, 2005 9:06 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group