
unit count_up
{
	public const uint16 ID = 0;

	public link unit io {}
	
	//---------------------
	//[i] var_int32 count_time;
	public int32 count_time;
	
	//---------------------
	//[i] var_uint8 OS_time;
	public uint8 OS_time;
	
	bool start_count;
	bool time_ready;
	
	//------------------------------------------
	//[i] function_void OS_init;
	public void OS_init()
	{
		OS_time = 1;
		count_time = 0;
		#include "$run$.txt"
		start_count = false;
	}
	//------------------------------------------
	//[i] function_void clear;
	public void clear()
	{
		count_time = 0;
		#include "$run$.txt"
	}
	//------------------------------------------
	//[i] function_void begin,
	public void begin()
	{
		start_count = true;
	}
	//------------------------------------------
	//[i] function_void pause,
	public void pause()
	{
		start_count = false;
	}
	//------------------------------------------
	//[i] function_void OS_run,
	public void OS_run()
	{
		if( !start_count ) return;
		count_time + 1;
		#include "$run$.txt"
	}
}

