
#include <sys/types.h>
#include <sys/dir.h>
#include <sys/time.h>

#ifdef NeXT
#include <libc.h>
#endif

int		curtime;

void Sys_Mkdir (char *path)
{
	mkdir (path, 0777);
}

/*
================
Sys_Milliseconds
================
*/
int Sys_Milliseconds (void)
{
	struct timeval tp;
	struct timezone tzp;
	static int		secbase;

	gettimeofday(&tp, &tzp);
	
	if (!secbase)
	{
		secbase = tp.tv_sec;
		return tp.tv_usec/1000;
	}

	curtime = (tp.tv_sec - secbase)*1000 + tp.tv_usec/1000;
	
	return curtime;
}

/*
================
Sys_Init
================
*/
void Sys_Init (void)
{
}
