PHP4用户手册:函数->usleep (转)

本文介绍了PHP4中的usleep函数,该函数用于暂停程序执行指定的毫秒数。文章详细解释了函数的用法及参数,并指出其在Windows操作系统中可能无法正常工作。
PHP4用户手册:函数->usleep (转)[@more@]

usleep

(PHP 3, PHP 4 >= 4.0.0)

usleep -- 暂停 执行多少毫秒

描述

void usleep (int micro_seconds)

usleep() 函数暂停程序执行由 micro_seconds指定的毫秒数

参见 服务器脚本类/PHP/PHP用户手册/fancy/function.sleep.html">sleep().

注意:这个函数不能工作在 windows 操作系统中。



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10752043/viewspace-991065/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10752043/viewspace-991065/

SysLogger::getInstance()->logMsg(LOGBRANCH::APP, LEVEL::EVENT, getSelfName() + ": about to do chuck - pressure " + Converter::convertToString(pressure)); int cfgESCHVPowerPolarity = m_cfgESCHVPowerPolarityMap[mode]->getValue(); try { if(!m_pin->isDown()) { m_pin->call_Down(); } if (m_cfgIdleBackSideHeOn != NULL) //add by phm for PinVac { m_heValve1->call_Open(); m_heValve3->call_Open(); m_hePC->call_SetPressure(pressure); } m_ESCDC->call_SetCurrent(3); if (m_cfgIdleBackSideHeOn == NULL) //add by phm for PinVac { m_heValve1->call_Close(); m_heValve2->call_Close(); m_heValve4->call_Close(); m_heValve3->call_Open(); } //added by zhongchenyu 20170822 if(hasCfgIntParam("cfgESCHVPowerPolarityReverseByWafer") && getCfgIntPraram("cfgESCHVPowerPolarityReverseByWafer")==1) { if(m_CurrentESCHVPowerPolarity == 0) { m_ESCDC->call_ChangePolarity(1); m_CurrentESCHVPowerPolarity = 1; } else { m_ESCDC->call_ChangePolarity(0); m_CurrentESCHVPowerPolarity = 0; } } //added by zhongchenyu 20170822 else { m_ESCDC->call_ChangePolarity(cfgESCHVPowerPolarity); } m_ESCDC->call_Charge(); m_ESCDC->call_SetVoltage(m_cfgESCClampVoltageSetpoint->getValue()); usleep(500*1000);//added by zhongchenyu 20170822 m_ESCDC->call_On(); if(!waitfor(m_ESCDC->isVoltageOk(), (long)(m_cfgESCClampVoltageToleranceTimeout->getValue())*1000)) { SysLogger::getInstance()->logMsg(LOGBRANCH::APP, LEVEL::ERROR, getSelfName() + ": waitfor ESCDC voltage ok timeout"); m_bESCClampTimeout->post(this); } if (m_cfgIdleBackSideHeOn == NULL) //add by phm for PinVac { m_heValve1->call_Open(); sleep((long)(m_cfgESCHeOnDelayTime->getValue())); m_heValve2->call_Open(); m_hePC->call_SetPressure(pressure); } if((m_cfgESCChargingTime->getValue() - m_cfgESCHeOnDelayTime->getValue()) > 0) { sleep((long)(m_cfgESCChargingTime->getValue() - m_cfgESCHeOnDelayTime->getValue())); } if (m_cfgIdleBackSideHeOn == NULL) //add by phm for PinVac { sleep(1); } m_ESCDC->call_SetVoltage(m_cfgESCHoldingVoltage->getValue()); if (m_cfgIdleBackSideHeOn != NULL) //add by phm for PinVac { m_heValve4->call_Open(); m_heValve6->call_Open(); usleep(200*1000); m_heValve2->call_Open(); } } catch(const IOException &ex) { SysLogger::getInstance()->logMsg(LOGBRANCH::APP, LEVEL::ERROR, getName() + ":in chuck got IOException '" + string(ex.what()) + "'"); m_serviceName->setValue("chuck"); m_errorMsg->setValue("IO error"); m_nServiceFailedAlm->post(this); throw; } catch(const AbortException &ex) { SysLogger::getInstance()->logMsg(LOGBRANCH::APP, LEVEL::ERROR, getName() + ":in chuck got AbortException '" + string(ex.what()) + "'"); m_serviceName->setValue("chuck"); m_errorMsg->setValue("aborted"); m_nServiceFailedAlm->post(this); throw; } catch(const exception &ex) { SysLogger::getInstance()->logMsg(LOGBRANCH::APP, LEVEL::ERROR, getName() + ":in chuck got exception '" + string(ex.what()) + "'"); m_serviceName->setValue("chuck"); m_errorMsg->setValue("inner error"); m_nServiceFailedAlm->post(this); throw; } SysLogger::getInstance()->logMsg(LOGBRANCH::APP, LEVEL::EVENT, getSelfName() + ": done chuck "); } 帮我缕缕代码流程
08-19
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值