//********************************************************************
// This source file is part of Ninfa3D Engine
// 
// Copyright (C) 2008-2009 Viz_fuerte.
// All rights reserved.
// 
// LIMITED WARRANTY
// This software is provided "as-is", without any express or implied warranty.
// In no event shall the author be held liable for any damages arising from the use of this software.
// This is a contract. By accepting the Ninfa3D Engine (the SOFTWARE), 
// you (either an individual or a single entity, the LICENSEE) accept the terms and conditions of this licensing agreement.
// 
// If the LICENSEE does not accept the terms and conditions, then LICENSEE must not accept the SOFTWARE.
// If at a later time the LICENSEE decides not to continue licensing the SOFTWARE under these terms and 
// conditions, then the LICENSEE must delete permanently all files constituting the SOFTWARE.
//
// File: Time.cpp
//********************************************************************

/*--------------------------------------------------------------------
Includos*/

	#include "..\..\Header Files\Ninfa3D.h"

/*--------------------------------------------------------------------
Variables externas*/

	extern IrrlichtDevice* device;

/*--------------------------------------------------------------------
Declaracion global de funciones*/

extern "C"
{

	/*====================================================================
	CAMBIA LA VELOCIDAD DEL TIEMPO.*/

	DLL_EXPORT void DLL_APIENTRY TimeSpeed(float Speed)
	{
		device->getTimer()->setSpeed(Speed);
	}

	/*====================================================================
	ACTIVA EL TIEMPO.*/

	DLL_EXPORT void DLL_APIENTRY TimeStart()
	{
		device->getTimer()->start();
	}

	/*====================================================================
	PARALIZA EL TIEMPO.*/

	DLL_EXPORT void DLL_APIENTRY TimeStop()
	{
		device->getTimer()->stop();
	}

	/*====================================================================
	DEVUELVE EL TIEMPO.*/

	DLL_EXPORT unsigned int DLL_APIENTRY GetTime()
	{
		return device->getTimer()->getTime();
	}

	/*====================================================================
	DEVUELVE EL TIEMPO REAL.*/

	DLL_EXPORT unsigned int DLL_APIENTRY GetRealTime()
	{
		return device->getTimer()->getRealTime();
	}

}