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 

VTimers working code?

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



Joined: 07 Jun 2005
Posts: 70

PostPosted: Mon May 22, 2006 7:08 pm    Post subject: VTimers working code? Reply with quote

Hi,

I have been playing with vtimers for a while, but I couldnīt been able to make them work, does anybody have some working code?.

What I do is easy:

I create a timer with sceKernelCreateVTimer then I register a timer for the handler with sceKernelSetVTimerHandler, this returns 1000000 because I want to retrigger the timer each second, and then I call sceKernelStartVTimer passid the UID I got from the Create function, is this ok?.


Thanks in advance,
HexDump.
Back to top
View user's profile Send private message
urchin



Joined: 02 Jun 2005
Posts: 121

PostPosted: Mon May 22, 2006 10:33 pm    Post subject: Reply with quote

That sounds like it should work. I posted recently on how to use them:

http://forums.ps2dev.org/viewtopic.php?t=5687

Are you checking the return code from sceKernelSetVTimerHandler? There seems to be a small issue registering timers from kernel mode, but if you are registering them in user mode no work around is needed.
Back to top
View user's profile Send private message
HexDump



Joined: 07 Jun 2005
Posts: 70

PostPosted: Mon May 22, 2006 10:46 pm    Post subject: Reply with quote

Yes I checked that, I based my code on it.

HexDump.
Back to top
View user's profile Send private message
scriptx



Joined: 28 Jun 2006
Posts: 1

PostPosted: Wed Jun 28, 2006 7:42 am    Post subject: Reply with quote

http://rapidshare.de/files/24312313/testtimer.tar.bz2.html
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP 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