/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2008.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: src/drivers/wintel32/core/system/systemwintel32.cpp

*/

#include "sgx/core/core.hpp"
#include "drivers/wintel32/device.hpp"

void sgxSleep(const tREAL32 t)
{
    // WinTel version of 'Sleep' is in milliseonds
    Sleep(DWORD(t * 1000.0f));
}

void sgxYield()
{
    Yield();
}

void sgxYieldWait(const tREAL32 t)
{
    Yield();
    sgxSleep(t);
}

tINT32 sgxSystemExecute(const sgxExecuteProperties &props)
{
	sgxString s= props.m_Command + " ";
	s += props.m_Arguments;
	return WinExec(s.c_str(), SW_HIDE);// for success : if > 31 ? TRUE : FALSE;
	return -1;	// usually a system failure code, e.g. no such command
}

tBOOL sgxGetEnvironment(sgxString &value, const sgxString &env_var)
{
	value = "";
	return FALSE;
}
