コード例 #1
0
v8::Handle<v8::Value> Jclock_gettimejs::clock_gettime(const v8::Arguments& args) {
    METHOD_BEGIN(1);
    //timespec clock_gettime(int clk_id)
    int clk_id = bea::Convert<int>::FromJS(args[0], 0);
    THROW_IF_NOT(clk_id >= 0, "Invalid clk_id");
    THROW_IF_NOT(clk_id < 10, "Invalid clk_id");
    clock_gettimejs::timespec fnRetVal = clock_gettimejs::clock_gettime(clk_id);
    return bea::Convert<clock_gettimejs::timespec>::ToJS(fnRetVal);
    METHOD_END();
}
コード例 #2
0
ファイル: Queue.cpp プロジェクト: dragonmoose/Project2016
Queue::Queue(VkQueue p_Queue, QueueType p_Type, uint32 p_uiFamilyIndex)
: m_Handle(p_Queue)
, m_Type(p_Type)
, m_uiFamilyIndex(p_uiFamilyIndex)
{
	THROW_IF_NOT(m_Handle, "VkQueue handle null");
}
コード例 #3
0
void SceneManager::CmdPopulate(int32 p_iDepth, int32 p_iLevelMax)
{
	try
	{
		THROW_IF_NOT(p_iDepth >= 0, "Depth cannot be negative");
		THROW_IF_NOT(p_iDepth <= 5, "Depth cannot exceed 5");
		THROW_IF_NOT(p_iLevelMax > 0, "LevelMax needs to be at least 1");
		THROW_IF_NOT(p_iLevelMax <= 5, "LevelMax cannot exceed 5");

		Clear();
		AddEntities(m_Root, p_iDepth, p_iLevelMax + 1);
		
		CONSOLE_WRITE_SCOPE();
		std::cout << "-New scene-------------------------------------------------\n";
		m_Root->DebugPrint(0);
		std::cout << "\n\n";
	}
	catch (Exception& e)
	{
		LOG_EXCEPTION_CONSOLE(e);
	}
}