File:  [RetroPC.NET] / np2 / mona / timemng.c
Revision 1.1: download - view: text, annotated - select for diffs
Fri Feb 4 14:45:46 2005 JST (20 years, 8 months ago) by yui
Branches: MAIN
CVS tags: VER_0_82_x64, VER_0_82, VER_0_81A, VER_0_81, HEAD
support Mona-OS (T.Yui)

#include	"compiler.h"
#if !defined(TARGET_MONA)
#include	<time.h>
#endif
#include	"timemng.h"


BOOL timemng_gettime(_SYSTIME *systime) {

	time_t	long_time;
struct tm	*now_time;

	time(&long_time);
	now_time = localtime(&long_time);
	if (now_time != NULL) {
		systime->year = now_time->tm_year + 1900;
		systime->month = now_time->tm_mon + 1;
		systime->week = now_time->tm_wday;
		systime->day = now_time->tm_mday;
		systime->hour = now_time->tm_hour;
		systime->minute = now_time->tm_min;
		systime->second = now_time->tm_sec;
		systime->milli = 0;
		return(SUCCESS);
	}
	else {
		return(FAILURE);
	}
}


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