//------------------------------------------------------------------------------
// Lamp : Open source game middleware
// Copyright (C) 2004  Junpei Ohtani ( Email : junpee@users.sourceforge.jp )
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//------------------------------------------------------------------------------

/** @file
 * タイマのテスト実装
 * @author Junpee
 */

#include <windows.h>
#include "Test/stdafx.h"
#include "Core/Utility/TimerTest.h"
#include <Core/Utility/Timer.h>
#include "Core/Thread/Thread.h"

//------------------------------------------------------------------------------
// テストを実行する
void TimerTest::runTest(){
	Timer::Tick tick = Timer::getTick();
	float time0 = Timer::getInterval(tick);
	float time1 = Timer::getInterval(tick);
	TestAssert(time0 < time1);
/*
	Thread::sleep(20);

	tick = Timer::getTick();
	Thread::sleep(1);
	time0 = Timer::getInterval(tick);

	tick = Timer::getTick();
	Thread::sleep(1);
	time1 = Timer::getInterval(tick);

	tick = Timer::getTick();
	Thread::sleep(1);
	float time2 = Timer::getInterval(tick);

	tick = Timer::getTick();
	Thread::sleep(1);
	float time3 = Timer::getInterval(tick);


	timeEndPeriod(1);
	DebugOut("\n%f\n", time0);
	DebugOut("\n%f\n", time1);
	DebugOut("\n%f\n", time2);
	DebugOut("\n%f\n", time3);
*/
}
//------------------------------------------------------------------------------
