// service_test.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include
#include
#define SLEEP_TIME 5000
#define LOGFILE "D:\\TEST\\memstatuse.txt"
int WriteToLog(char *);
SER...
分类:
编程语言 时间:
2015-02-27 10:12:41
阅读次数:
202
之前没怎么深究,觉得差不多,不过看了weili的关于HttpClientConnectionManager的管理源代码之后,感觉略有不同,稍作记录,用自己的语言做一个记述;sleep和wait都是释放cpu的资源,即原本拥有cpu的使用权,但是在调用之后就放弃执行了,不同之处在于sleep不会释放其...
分类:
其他好文 时间:
2015-02-26 22:57:46
阅读次数:
148
由于sleep进程比较多,就写个特简单的脚本,批量删除下,只保留5个即可#!/bin/shn=`/export/servers/mysql/bin/mysqladminprocesslist-uroot-pxxxxx|grep-isleep|wc-l`echo$nif["$n"-gt10]thenforiin`/export/servers/mysql/bin/mysqladminprocesslist-uroot-pxxxxxx|grep-isle..
分类:
系统相关 时间:
2015-02-26 00:01:49
阅读次数:
420
1 /opt/tomcat/bin/shutdown.sh2 sleep 53 ps aux|grep "apache-tomcat-7.0.1" |grep -v "grep" |grep "java" |awk '{print $2}' |xargs kill -94 rm -f /opt/to...
分类:
其他好文 时间:
2015-02-25 00:43:55
阅读次数:
250
浏览器内核常驻线程浏览器 GUI 渲染线程JavaScript 引擎线程浏览器定时触发器线程浏览器事件触发线程浏览器 http 异步请求线程浏览器 GUI 渲染线程 和JavaScript 引擎线程之间是互斥的在debug里面check一下如下代码的效果即可知道var sleep = functio...
分类:
编程语言 时间:
2015-02-24 22:12:35
阅读次数:
285
一、基本知识点
1、Intent intent = new Intent();//打开浏览器的
intent.setAction(Intent.ACTION_VIEW);
intent.setData(Uri.parse("http://www.baidu.com"));
2、SystemClock.sleep(20000);//睡眠20秒,用来掩饰想赢一场
3、耗时...
分类:
其他好文 时间:
2015-02-24 15:10:23
阅读次数:
170
三种不同精度的睡眠1.sleep#include
unsigned int sleep(unsigned int seconds);RETURN VALUE Zero if the requested time has elapsed, or the number of seconds left to sleep, if the call was interrupted by a sig...
分类:
系统相关 时间:
2015-02-18 16:28:26
阅读次数:
236
1. 为什么不能用sleep总所周知,在Linux环境下对于程序的睡眠操作,我们可以使用sleep,那这里为为什么qt也不来一个呢?其实qt是针对于图形界面的程序,如果直接sleep,那界面势必无法响应,由此带来的用户体验必然是糟糕的。因此qt里面的程序等待另有他法。2. 怎样去实现呢大概实现原理是...
分类:
其他好文 时间:
2015-02-16 11:23:30
阅读次数:
239
有时候为了保证脚步运行的稳定性,需要在脚本中添加等待时间添加休眠:需要引入time包,选择一个固定的时间的等待。实例:import time .... time.sleep(2)智能等待:通过添加implicitly_wait(),可以在一个时间范围内智能等待。隐式地等待一个元素被发现或一个命令完成...
分类:
编程语言 时间:
2015-02-16 08:59:12
阅读次数:
228
代码很简单: DBGrideh.StartLoadingStatus(' Loading ... '); Sleep(500); DBGrideh.FinishLoadingStatus; 做下变动: DBGrideh.StartLoadingStatus(' Loading ... ...
分类:
其他好文 时间:
2015-02-14 16:10:52
阅读次数:
237