File: 
 
[RetroPC.NET] / 
np2 / 
x11 / 
timemng.c
 Revision 
1.2: 
download - view: 
text, 
annotated - 
select for diffs
Mon Nov 17 01:43:45 2003 JST (21 years, 11 months ago) by 
monaka
Branches: 
MAIN
CVS tags: 
VER_0_82_x64,
VER_0_82,
VER_0_81A,
VER_0_81,
VER_0_80,
VER_0_79,
VER_0_78,
VER_0_77,
VER_0_76,
VER_0_75,
VER_0_74,
VER_0_73,
VER_0_72,
HEAD
Neko Project II for X11 (only support GTK+ GUI Toolkit)
#include	"compiler.h"
#include	<time.h>
#include	"timemng.h"
BOOL
timemng_gettime(_SYSTIME *systime)
{
	struct tm *now_time;
	time_t long_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;
	}
	return FAILURE;
}
RetroPC.NET-CVS <cvs@retropc.net>