File:  [RetroPC.NET] / xmil / palm / timemng.c
Revision 1.1: download - view: text, annotated - select for diffs
Tue Feb 8 01:56:32 2005 JST (20 years, 8 months ago) by tk800
Branches: MAIN
CVS tags: HEAD
support palmos(tk800)

#include	"compiler.h"
#include	"timemng.h"


BOOL timemng_gettime(_SYSTIME *systime) {

	UINT32			now_time[4];
	DateTimeType*	ptr;

	ptr = (DateTimeType*)now_time;
	ARM_TimSecondsToDateTime (ARM_TimGetSeconds(), ptr);

	systime->year = ByteSwap32(now_time[2]) & 0xffff;
	systime->month = ByteSwap16(now_time[2] & 0xffff);
	systime->week = ByteSwap16(now_time[3] & 0xffff);
	systime->day = ByteSwap32(now_time[1]) & 0xffff;
	systime->hour = ByteSwap16(now_time[1] & 0xffff);
	systime->minute = ByteSwap32(now_time[0]) & 0xffff;
	systime->second = ByteSwap16(now_time[0] & 0xffff);
	systime->milli = 0;
/*
	systime->year = ByteSwap16(now_time.year);
	systime->month = ByteSwap16(now_time.month);
	systime->week = ByteSwap16(now_time.weekDay);
	systime->day = ByteSwap16(now_time.day);
	systime->hour = ByteSwap16(now_time.hour);
	systime->minute = ByteSwap16(now_time.minute);
	systime->second = ByteSwap16(now_time.second);
*/
	return(SUCCESS);
}


RetroPC.NET-CVS <cvs@retropc.net>