File:  [RetroPC.NET] / np2 / x11 / taskmng.c
Revision 1.5: download - view: text, annotated - select for diffs
Sun Sep 27 20:25:38 2009 JST (16 years, 1 month ago) by monaka
Branches: MAIN
CVS tags: HEAD
aplly patch from tokumei-san.

#include "compiler.h"

#include "np2.h"
#include "toolkit.h"

#include "taskmng.h"


void
taskmng_initialize(void)
{

	np2running = 1;
}

BOOL
taskmng_sleep(UINT32 tick)
{
	UINT32 base;
	UINT32 now;

	base = GETTICK();
	while (taskmng_isavail() && (((now = GETTICK()) - base) < tick)) {
		toolkit_event_process();
		usleep((tick - (now - base) / 2) * 1000);
	}
	return taskmng_isavail();
}

void
taskmng_exit(void)
{

	np2running = 0;
}

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