| View previous topic :: View next topic |
| Author |
Message |
kweensey
Joined: 29 Jan 2009 Posts: 26
|
Posted: Sat Feb 28, 2009 3:38 am Post subject: How to get actual time in PSP? |
|
|
Hey,
Is there any way to get time (in hours and minutes) adjusted in PSP?
Thank you.
kweensey
Last edited by kweensey on Sat Feb 28, 2009 7:54 pm; edited 1 time in total |
|
| Back to top |
|
 |
Zer01ne
Joined: 08 Sep 2008 Posts: 29
|
Posted: Sat Feb 28, 2009 9:57 am Post subject: |
|
|
pspTime psptime;
sceRtcGetCurrentClockLocalTime(&psptime);
printf("%02u/%02u/%02u %02u:%02u:%02u", psptime. day, psptime.month, psptime.year, psptime.hour, psptime.minutes, psptime.seconds); |
|
| Back to top |
|
 |
kweensey
Joined: 29 Jan 2009 Posts: 26
|
Posted: Sat Feb 28, 2009 7:46 pm Post subject: |
|
|
Hey,
thanks for reply.. :)
Do I need to define something? Because if I compile that, Cygwin give me some errors:
| Code: | psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=
150 -c -o main.o main.c
main.c: In function 'main':
main.c:43: error: 'pspTime' undeclared (first use in this function)
main.c:43: error: (Each undeclared identifier is reported only once
main.c:43: error: for each function it appears in.)
main.c:43: error: expected ';' before 'psptime'
main.c:45: warning: implicit declaration of function 'sceRtcGetCurrentClockLocal
Time'
main.c:45: error: 'psptime' undeclared (first use in this function)
make: *** [main.o] Error 1 |
Thanks for help.
kweensey |
|
| Back to top |
|
 |
Zer01ne
Joined: 08 Sep 2008 Posts: 29
|
Posted: Sat Feb 28, 2009 10:46 pm Post subject: |
|
|
| #include <psprtc.h> |
|
| Back to top |
|
 |
kweensey
Joined: 29 Jan 2009 Posts: 26
|
Posted: Sat Feb 28, 2009 10:49 pm Post subject: |
|
|
Everything OK now.. Thank you.. ;)
kweensey |
|
| Back to top |
|
 |
|