File:  [RetroPC.NET] / xmil / palm / timemng.c
Revision 1.2: download - view: text, annotated - select for diffs
Sat Feb 26 12:59:50 2005 JST (20 years, 8 months ago) by tk800
Branches: MAIN
CVS tags: HEAD
support Treo and T5[palm](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;

	return(SUCCESS);
}


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