How to get actual time in PSP?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
kweensey
Posts: 26
Joined: Thu Jan 29, 2009 5:43 pm

How to get actual time in PSP?

Post by kweensey »

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.
Zer01ne
Posts: 28
Joined: Mon Sep 08, 2008 7:15 am

Post by Zer01ne »

pspTime psptime;
sceRtcGetCurrentClockLocalTime(&psptime);

printf("%02u/%02u/%02u %02u:%02u:%02u", psptime. day, psptime.month, psptime.year, psptime.hour, psptime.minutes, psptime.seconds);
kweensey
Posts: 26
Joined: Thu Jan 29, 2009 5:43 pm

Post by kweensey »

Hey,
thanks for reply.. :)

Do I need to define something? Because if I compile that, Cygwin give me some errors:

Code: Select all

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
Zer01ne
Posts: 28
Joined: Mon Sep 08, 2008 7:15 am

Post by Zer01ne »

#include <psprtc.h>
kweensey
Posts: 26
Joined: Thu Jan 29, 2009 5:43 pm

Post by kweensey »

Everything OK now.. Thank you.. ;)

kweensey
Post Reply