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 

sceRtcGetTick

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



Joined: 02 Jun 2007
Posts: 26

PostPosted: Thu Aug 09, 2007 1:23 am    Post subject: sceRtcGetTick Reply with quote

Can anyone help me out on how to make the sceRtcGetTick return something other then 0

Here is my code

Code:

void AlarmManager::Save()
{
   ofstream writefile;
   list<Alarm*> alarms;
   u64 *CurTick = NULL;
   pspTime CurTime;
   
   list<Alarm*>::iterator iter;
   writefile.open("data/file/Alarms.dat");
   
   for (iter = Alarms.begin(); iter != Alarms.end(); iter++)
   {
      CurTime = (*iter)->GetTime();
      sceRtcGetTick(&CurTime, CurTick);

      writefile << (*iter)->GetRepeat() << "|" << (*iter)->GetSound().size() << "|" << (*iter)->GetSound()
              << "|" << (*iter)->GetAllowSnooze() << "|" << (*iter)->GetLabel().size() << "|" << (*iter)->GetLabel()
              << "|" << CurTick << "|" << (*iter)->GetTime().day << endl;
      alarms.push_back(*iter);
   }
   writefile.close();
}


So basically all I get in my file is 0 and just for test I did sned GetTime().day and I get the current day.

Cheers!!!
Nevermind, found it

Code:

void AlarmManager::Save()
{
   ofstream writefile;
   list<Alarm*> alarms;
   [b]u64 CurTick;[/b]
   pspTime CurTime;
   
   list<Alarm*>::iterator iter;
   writefile.open("data/file/Alarms.dat");
   
   for (iter = Alarms.begin(); iter != Alarms.end(); iter++)
   {
      CurTime = (*iter)->GetTime();
      sceRtcGetTick(&CurTime, [b]&CurTick[/b]);

      writefile << (*iter)->GetRepeat() << "|" << (*iter)->GetSound().size() << "|" << (*iter)->GetSound()
              << "|" << (*iter)->GetAllowSnooze() << "|" << (*iter)->GetLabel().size() << "|" << (*iter)->GetLabel()
              << "|" << CurTick << "|" << (*iter)->GetTime().day << endl;
      alarms.push_back(*iter);
   }
   writefile.close();
}


Thanks
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