当前位置: 首页>>代码示例>>C++>>正文


C++ PAUSE函数代码示例

本文整理汇总了C++中PAUSE函数的典型用法代码示例。如果您正苦于以下问题:C++ PAUSE函数的具体用法?C++ PAUSE怎么用?C++ PAUSE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了PAUSE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Call

void Call(){
  printf("Call thread id %u \n", (unsigned int)pthread_self());
  Global ++;
  INTERLEV_ACCESS(0,"cs1.Call","0");  

cs2: Create();

     Global ++;
     INTERLEV_ACCESS(0,"cs1.Call","0,1,2");  

     PAUSE("Create 0,1,2");
     
cs3: Join();

     Global ++;
     INTERLEV_ACCESS(0,"cs1.Call","0");  
     
     PAUSE("Join 0,1,2");

cs6: Create();

     Global ++;
     INTERLEV_ACCESS(0,"cs1.Call","0,3,4");  
     
     PAUSE("Create 0,3,4");

cs7: Join();

     Global ++;
     INTERLEV_ACCESS(0,"cs1.Call","0");  
     
     PAUSE("Join 0,3,4");
}
开发者ID:unsw-corg,项目名称:PTABen,代码行数:33,代码来源:succ_cxt_thdindex_2.c

示例2: Send

static int		dump_rom_2	(CalcHandle* handle, CalcDumpSize size, const char *filename)
{
	int i, err = 0;
	static const uint16_t keys[] = {				
		0x40, 0x09, 0x09,			/* Quit, Clear, Clear, */
		0xFE63, 0x97, 0xDA,			/* Send(, 9, prgm */
		0xAB, 0xA8, 0xA6, 0x9D,		/* R, O, M, D */
		0xAE, 0xA6, 0xA9, 0x05		/* U, M, P, Enter */
	};

	// Launch program by remote control
	for(i = 0; i < (int)(sizeof(keys) / sizeof(keys[0])); i++)
	{
		TRYF(send_key(handle, keys[i]));
		PAUSE(100);
	}

	do
	{
		handle->updat->refresh();
		if (handle->updat->cancel)
			return ERR_ABORT;
		
		//send RDY request ???
		PAUSE(1000);
		err = rd_is_ready(handle);
	}
	while (err == ERROR_READ_TIMEOUT);

	// Get dump
	TRYF(rd_dump(handle, filename));

	return 0;
}
开发者ID:tobiasBora,项目名称:emacs_ti,代码行数:34,代码来源:calc_83.c

示例3: Asm

static int		dump_rom_2	(CalcHandle* handle, CalcDumpSize size, const char *filename)
{
#if 0
	int i;
	static const uint16_t keys[] = { 
		0x40, 0x09, 0x09, 0xFC9C, /* Quit, Clear, Clear, Asm( */
		0xDA, 0xAB, 0xA8, 0xA6,   /* prgm, R, O, M */
		0x9D, 0xAE, 0xA6, 0xA9,   /* D, U, M, P */
		0x86 };                   /* ) */

	// Launch program by remote control
	PAUSE(200);
	for(i = 0; i < sizeof(keys) / sizeof(uint16_t); i++)
	{
		TRYF(send_key(handle, keys[i]));
		PAUSE(100);
	}

	// This fixes a 100% reproducible timeout: send_key normally requests a data ACK,
	// but when the program is running, no data ACK is sent. Therefore, hit the Enter
	// key without requesting a data ACK, only the initial delay ACK.
	TRYF(cmd_s_execute(handle, "", "", EID_KEY, NULL, 0x05));
	TRYF(cmd_r_delay_ack(handle));
	PAUSE(400);
#endif
#if 1
	TRYF(cmd_s_execute(handle, NULL, "ROMDUMP", EID_PRGM, NULL, 0));
	TRYF(cmd_r_data_ack(handle));
	PAUSE(400);
#endif
	// Get dump
	TRYF(rd_dump(handle, filename));

	return 0;
}
开发者ID:tobiasBora,项目名称:emacs_ti,代码行数:35,代码来源:calc_84p.c

示例4: PAUSE

static int		execute		(CalcHandle* handle, VarEntry *ve, const char* args)
{
	unsigned int i;

	// Go back to homescreen
	PAUSE(200);
	TRYF(send_key(handle, (KEY92P_CTRL + KEY92P_Q)));
	TRYF(send_key(handle, KEY92P_CLEAR));
	TRYF(send_key(handle, KEY92P_CLEAR));

	// Launch program by remote control
	for(i = 0; i < strlen(ve->folder); i++)
		TRYF(send_key(handle, (ve->folder)[i]));

    if(strcmp(ve->folder, ""))
		TRYF(send_key(handle, '\\'));

	for(i = 0; i < strlen(ve->name); i++)
		TRYF(send_key(handle, (ve->name)[i]));

    TRYF(send_key(handle, KEY92P_LP));
	if(args)
	{
		for(i = 0; i < strlen(args); i++)
			TRYF(send_key(handle, args[i]));
	}
    TRYF(send_key(handle, KEY92P_RP));

    TRYF(send_key(handle, KEY92P_ENTER));
	PAUSE(200);

	return 0;
}
开发者ID:tobiasBora,项目名称:emacs_ti,代码行数:33,代码来源:calc_92.c

示例5: printf

void *foo1(void *x) {

  int *tid = x;

  printf("Call thread id %u \n", (unsigned int)pthread_self());
  Global ++;
  INTERLEV_ACCESS(1,"cs1.foo1","0,1,3,4");  
  INTERLEV_ACCESS(3,"cs2.foo1","0,3,1,2");  
     
  PAUSE("foo1.before cs3");

cs3: pthread_create(&tt[*tid], NULL, foo2, NULL);

     PAUSE("foo1 after cs3");

     Global ++;
     INTERLEV_ACCESS(1,"cs1.foo1","0,1,2,3,4");  
     INTERLEV_ACCESS(3,"cs2.foo1","0,3,4,1,2");  

     pthread_join(tt[*tid], NULL);

     PAUSE("foo1 after join 3");

     Global ++;
     INTERLEV_ACCESS(1,"cs1.foo1","0,1,3,4");  
     INTERLEV_ACCESS(3,"cs2.foo1","0,3,1,2");  
     return x;
}
开发者ID:unsw-corg,项目名称:PTABen,代码行数:28,代码来源:imprecise_cxt_thdindex_9.c

示例6: PAUSE

static int		execute		(CalcHandle* handle, VarEntry *ve, const char* args)
{
	unsigned int i;

	// Go back to homescreen
	PAUSE(200);
	TRYF(send_key(handle, KEY83_Quit));
	TRYF(send_key(handle, KEY83_Clear));
	TRYF(send_key(handle, KEY83_Clear));

	// Launch program by remote control
	if(ve->type == TI83_ASM)
	{
		TRYF(send_key(handle, KEY83_SendMBL));
		TRYF(send_key(handle, KEY83_9));
	}
	TRYF(send_key(handle, KEY83_Exec));

	for(i = 0; i < strlen(ve->name); i++)
	{
		const CalcKey *ck = ticalcs_keys_83((ve->name)[i]);
		TRYF(send_key(handle, ck->normal.value));
	}

	TRYF(send_key(handle, KEY83_Enter));
	PAUSE(200);

	return 0;
}
开发者ID:debrouxl,项目名称:tilp-libticalcs,代码行数:29,代码来源:calc_83.c

示例7: Send

static int		dump_rom_2	(CalcHandle* handle, CalcDumpSize size, const char *filename)
{
	int ret = 0;
	unsigned int i;

	if (handle->model == CALC_TI83)
	{
		static const uint16_t keys[] = {
			0x40, 0x09, 0x09,       /* Quit, Clear, Clear, */
			0xFE63, 0x97, 0xDA,     /* Send(, 9, prgm */
			0xAB, 0xA8, 0xA6, 0x9D, /* R, O, M, D */
			0xAE, 0xA6, 0xA9, 0x05  /* U, M, P, Enter */
		};

		// Launch program by remote control
		for (i = 0; !ret && i < sizeof(keys) / sizeof(keys[0]); i++)
		{
			ret = send_key(handle, (uint32_t)(keys[i]));
			PAUSE(100);
		}
	}
	else if (handle->model == CALC_TI86)
	{
		static const uint16_t keys[] = {
			0x76, 0x08, 0x08,       /* Quit, Clear, Clear, */
			0x28, 0x3A, 0x34, 0x11, /* A, S, M, (, */
			0x39, 0x36, 0x34, 0x2B, /* R, O, M, D, */
			0x56, 0x4E, 0x51, 0x12, /* u, m, p, ), */
			0x06                    /* Enter */
		};
		uint16_t dummy;

		// Launch program by remote control
		for (i = 0; !ret && i < (sizeof(keys) / sizeof(keys[0])) - 1; i++)
		{
			ret = send_key(handle, (uint32_t)(keys[i]));
		}

		if (!ret)
		{
			ret = SEND_KEY(handle, keys[i]);
			if (!ret)
			{
				ret = RECV_ACK(handle, &dummy);
			}
			PAUSE(200);
		}
	}

	if (!ret)
	{
		// Get dump
		ret = rd_dump(handle, filename);

		// TI-86: normally there would be another ACK after the program exits, but the ROM dumper disables that behaviour.
	}

	return ret;
}
开发者ID:TC01,项目名称:tilibs,代码行数:59,代码来源:calc_8x.c

示例8: Asm

static int		dump_rom_2	(CalcHandle* handle, CalcDumpSize size, const char *filename)
{
	static const uint16_t keys_83p[] = {
		0x40, 0x09, 0x09, 0xFC9C, /* Quit, Clear, Clear, Asm( */
		0xDA, 0xAB, 0xA8, 0xA6,   /* prgm, R, O, M */
		0x9D, 0xAE, 0xA6, 0xA9,   /* D, U, M, P */
		0x86, 0x05 };             /* ), Enter */

	static const uint16_t keys_73[] = {
		0x40, 0x09, 0x09, 0xDA,   /* Quit, Clear, Clear, prgm */
		0xAB, 0xA8, 0xA6, 0x9D,   /* R, O, M, D, */
		0xAE, 0xA6, 0xA9, 0x05 }; /* U, M, P, Enter */

	int ret = 0;
	const uint16_t *keys;
	unsigned int i, nkeys;

	if (handle->model == CALC_TI73)
	{
		keys = keys_73;
		nkeys = sizeof(keys_73) / sizeof(keys_73[0]);
	}
	else
	{
		keys = keys_83p;
		nkeys = sizeof(keys_83p) / sizeof(keys_83p[0]);
	}

	// Launch program by remote control
	PAUSE(200);
	for (i = 0; !ret && i < nkeys - 1; i++)
	{
		ret = send_key(handle, (uint32_t)(keys[i]));
		PAUSE(100);
	}

	if (!ret)
	{
		// This fixes a 100% reproducible timeout: send_key normally requests an ACK,
		// but when the program is running, no ACK is sent. Therefore, hit the Enter key
		// without requesting an ACK.
		ret = SEND_KEY(handle, keys[i]);
		if (!ret)
		{
			ret = RECV_ACK(handle, NULL); // when the key is received
			if (!ret)
			{
				PAUSE(1000);

				// Get dump
				// (Normally there would be another ACK after the program exits,
				// but the ROM dumper disables that behavior)
				ret = rd_dump(handle, filename);
			}
		}
	}

	return ret;
}
开发者ID:debrouxl,项目名称:tilibs,代码行数:59,代码来源:calc_73.c

示例9: wrapWaitSynchronizationN

u32 wrapWaitSynchronizationN(u32 nanoseconds1,u32 handles_ptr,u32 handles_count,u32 wait_all,u32 nanoseconds2,u32 out) // TODO: timeouts
{
    bool all_unlocked = true;

    for (u32 i = 0; i < handles_count; i++) {
        u32 handle = mem_Read32(handles_ptr + i * 4);
        handleinfo* hi = handle_Get(handle);

        if (hi == NULL) {
            arm11_SetR(1, i);
            ERROR("handle %08x not found.\n", handle);
            PAUSE();
#ifdef EXIT_ON_ERROR
            exit(1);
#endif
            return -1;
        }

        if (hi->type >= NUM_HANDLE_TYPES) {
            // This should never happen.
            ERROR("handle %08x has non-defined type.\n", handle);
            PAUSE();
            exit(1);
        }

        // Lookup actual callback in table.
        if (handle_types[hi->type].fnWaitSynchronization != NULL) {
            bool locked = false;

            handle_types[hi->type].fnWaitSynchronization(hi, &locked);

            if (!locked && !wait_all) {
                arm11_SetR(1, i);
                return 0;
            } else
                all_unlocked = false;

        } else {
            ERROR("WaitSynchronization undefined for handle-type \"%s\".\n",
                  handle_types[hi->type].name);
            PAUSE();
            arm11_SetR(1, i); //we just say this one is open
            return 0;
        }
    }

    if(wait_all && all_unlocked) {
        arm11_SetR(1, handles_count);
        return 0;
    }

    // Put thread in WAITING state if not all handles were unlocked.
    u32* wait_list = malloc(handles_count*4);
    mem_Read((u8 *) wait_list, handles_ptr, handles_count * 4);

    threads_SetCurrentThreadWaitList(wait_list, wait_all, handles_count);
    return 0;

}
开发者ID:20150,项目名称:3dmoo,代码行数:59,代码来源:handles.c

示例10: Check_Object

bool
gosFX::CardCloud__Specification::IsDataValid(bool fix_data)
{
	Check_Object(this);
	float max_offset, min_offset;
	float max_scale, min_scale;
	m_USize.ExpensiveComputeRange(&min_scale, &max_scale);
	float lower = min_scale;
	if(lower > 0.0f)
		lower = 0.0f;
	float upper = max_scale;
	//
	//------------------------------------
	// Calculate the worst case UV offsets
	//------------------------------------
	//
	m_VOffset.ExpensiveComputeRange(&min_offset, &max_offset);
	lower += min_offset;
	upper += max_offset;
	if(upper > 99.0f || lower < -99.0f)
	{
		if(fix_data)
		{
			m_VOffset.SetCurve(0.0f);
			PAUSE(("Warning: Curve \"VOffset\" in Effect \"%s\" Is Out of Range and has been Reset", (PSTR)m_name));
		}
		else
			return false;
	}
	m_VSize.ExpensiveComputeRange(&min_scale, &max_scale);
	lower = min_scale;
	if(lower > 0.0f)
		lower = 0.0f;
	upper = max_scale;
	//
	//------------------------------------
	// Calculate the worst case UV offsets
	//------------------------------------
	//
	max_offset, min_offset;
	m_UOffset.ExpensiveComputeRange(&min_offset, &max_offset);
	lower += min_offset;
	upper += max_offset;
	if(upper > 99.0f || lower < -99.0f)
	{
		if(fix_data)
		{
			m_UOffset.SetCurve(0.0f);
			PAUSE(("Warning: Curve \"UOffset\" in Effect \"%s\" Is Out of Range and has been Reset", (PSTR)m_name));
		}
		else
			return false;
	}
	return	SpinningCloud__Specification::IsDataValid(fix_data);
}
开发者ID:BobrDobr69,项目名称:mechcommander2,代码行数:55,代码来源:cardcloud.cpp

示例11: PAUSE

static int		execute		(CalcHandle* handle, VarEntry *ve, const char* args)
{
	int ret;

	if (handle->model == CALC_TI73 && ve->type == TI73_ASM)
	{
		return ERR_VOID_FUNCTION;
	}

	// Go back to homescreen
	PAUSE(200);
	ret = send_key(handle, KEY83P_Quit);
	if (!ret)
	{
		ret = send_key(handle, KEY83P_Clear);
		if (!ret)
		{
			ret = send_key(handle, KEY83P_Clear);
		}
	}

	if (!ret)
	{
		// Launch program by remote control
		if (ve->type == TI83p_ASM)
		{
			ret = send_key(handle, KEY83P_Asm);
		}
		if (!ret)
		{
			ret = send_key(handle, KEY83P_Exec);
			if (!ret)
			{
				unsigned int i;
				for (i = 0; !ret && i < strlen(ve->name); i++)
				{
					const CalcKey *ck = ticalcs_keys_83p((ve->name)[i]);
					ret = send_key(handle, (uint32_t)(ck->normal.value));
				}

				if (!ret)
				{
					ret = send_key(handle, KEY83P_Enter);

					PAUSE(200);
				}
			}
		}
	}

	return ret;
}
开发者ID:debrouxl,项目名称:tilibs,代码行数:52,代码来源:calc_73.c

示例12: PAUSE

static int		execute		(CalcHandle* handle, VarEntry *ve, const char* args)
{
	int ret;

	// Go back to homescreen
	PAUSE(200);
	ret = send_key(handle, KEY83_Quit);
	if (!ret)
	{
		ret = send_key(handle, KEY83_Clear);
		if (!ret)
		{
			ret = send_key(handle, KEY83_Clear);
		}
	}

	if (!ret)
	{
		// Launch program by remote control
		if (ve->type == TI83_ASM)
		{
			ret = send_key(handle, KEY83_SendMBL);
			if (!ret)
			{
				ret = send_key(handle, KEY83_9);
			}
		}
		if (!ret)
		{
			ret = send_key(handle, KEY83_Exec);
			if (!ret)
			{
				unsigned int i;
				for (i = 0; !ret && i < strlen(ve->name); i++)
				{
					const CalcKey *ck = ticalcs_keys_83((ve->name)[i]);
					ret = send_key(handle, (uint32_t)(ck->normal.value));
				}

				if (!ret)
				{
					ret = send_key(handle, KEY83_Enter);

					PAUSE(200);
				}
			}
		}
	}

	return ret;
}
开发者ID:TC01,项目名称:tilibs,代码行数:51,代码来源:calc_8x.c

示例13: dusb_cmd_r_delay_ack

// 0xBB00: delay acknowledgement
TIEXPORT3 int TICALL dusb_cmd_r_delay_ack(CalcHandle *handle)
{
	DUSBVirtualPacket* pkt;
	int retval = 0;

	VALIDATE_HANDLE(handle);

	pkt = dusb_vtl_pkt_new_ex(handle, 0, 0, NULL);

	retval = dusb_recv_data(handle, pkt);

	if (!retval)
	{
		if (pkt->type == DUSB_VPKT_ERROR)
		{
			retval = ERR_CALC_ERROR2 + err_code_pkt(pkt);
		}
		else if (pkt->type != DUSB_VPKT_DELAY_ACK)
		{
			ticalcs_info("cmd_r_data_ack: expected type 0x%4X, received type 0x%4X", DUSB_VPKT_DELAY_ACK, pkt->type);
			retval = ERR_INVALID_PACKET;
		}
	}

	PAUSE(100);

	dusb_vtl_pkt_del(handle, pkt);

	return retval;
}
开发者ID:TC01,项目名称:tilibs,代码行数:31,代码来源:dusb_cmd.c

示例14: sprintf

static int		dump_rom_2	(CalcHandle* handle, CalcDumpSize size, const char *filename)
{
	int err;

	// Wait for user's action (execing program)
	sprintf(handle->updat->text, _("Waiting for execing of program..."));
	handle->updat->label();

	do
	{
		handle->updat->refresh();
		if (handle->updat->cancel)
			return ERR_ABORT;
		
		//send RDY request ???
		PAUSE(1000);
		err = rd_is_ready(handle);
	}
	while (err == ERROR_READ_TIMEOUT);

	// Get dump
	TRYF(rd_dump(handle, filename));

	return 0;
}
开发者ID:Jonimoose,项目名称:tilp-libticalcs,代码行数:25,代码来源:calc_82.c

示例15: PAUSE

//¶¯Ì¬ÏÔʾͼ±ê
void VirtualWifiNotifyIcon::dynamic_show_icon()
{
	HICON* iconarray=new HICON[m_notifyiconinfo->DynamicNums];

	for (int i=0;i<m_notifyiconinfo->DynamicNums;++i)
	{
		iconarray[i]=LoadIcon(m_notifyiconinfo->DynamicShow[i]);
	}

	//CloseBallon();
	for (;;)   //ËÀÑ­»·
	{
		for (int i=0;i<m_notifyiconinfo->DynamicNums;)
		{
			PAUSE(INT_DYNAMIC_SHOW_TIME);
			if (!m_isdynamic_show)
			{
	            goto end;
			}
			if (!m_isshow)
			{
				SetIcon(iconarray[i]);
				++i;
			}	
		}
	}
	end:
	delete[] iconarray;
	SetIcon(LoadIcon(m_notifyiconinfo->NoStartPath));
}
开发者ID:lihaibo1989,项目名称:virtualWifi,代码行数:31,代码来源:VirtualWifiNotifyIcon.cpp


注:本文中的PAUSE函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。