linuxÒ»¸ösleepµÄÆæ¹ÖÎÊÌ⣬¸ßÊÖÀ´¸ø½â´ðÏÂÁË
while(1)
{
time_t now;
time(&now);
struct tm* pt=localtime(&now);
cout < < "µ±Ç°Ê±¼ä" < < pt->tm_min < < endl;
if((pt->tm_min)%5 == 0)
{
cout < < "ÔÚ" < < pt->tm_min < < "·ÖÖÓ³ÌÐòÖ´ÐÐ" < < endl;
g_pfile->AnalysisFile(data.c_str());
}
#ifdef WIN32
sleep(60000);
#else
sleep(60);
#endif
}
Õâ¸ö³ÌÐòÖ´Ðнá¹û£º
µ±Ç°Ê±¼ä£º11
µ±Ç°Ê±¼ä£º11
µ±Ç°Ê±¼ä£º12
µ±Ç°Ê±¼ä£º13
¡£¡£¡£
дÕâ¸ö³ÌÐò ÊÇÒ»Ö±ÔËÐÐµÄ Ã»Îå·ÖÖÓÖ´ÐÐÒ»´Î
ÿһ·ÖÖÓÅжÏÏÂʱ¼ä
µ«ÊÇΪʲôµÚÒ»´Îsleep£¨60£©Ã»ÓÐÆð×÷Óã¿£¿£¿
Õâ¸öÎÊÌâÈÃÎÒºÜÒÉ»ó£¬ÎÒ·´¸´Ð´´úÂë²âÊÔÁË£¬È·ÊµµÚÒ»´Îsleep£¨£©Ã»Æð×óÓÒ
µÚ¶þ´Îsleep ²Å³É¹¦
¾²âÊÔ£¬Ã»ÎÊÌâ
struct timespec thd_sleep,tmpsleep;
thd_sleep.tv_sec = 60;
thd_sleep.tv_nsec = 0;
nanosleep(&chThd_sleep,&chTmpsleep);
//=========================
sleep¾Ý˵ÊDz»°²È«µÄ¡£ÓÃÉÏÃæµÄµÄ°É
ѧϰÁË
ÓеĻú×ÓÓÐÕâ¸öÎÊÌ⣬ËäÈ»²»¶à£¬µ
Ïà¹ØÎÊ´ð£º
ʹÓÃStruts2ÉÏ´«Îļþ£¬ÔÚlinuxϱ¨´í
2009-09-29 14:56:20,801 [org.apache.struts2.interceptor.FileUploadInterceptor]-[ERROR] Processing of multipart/form-data request failed. c:/temp/upload__1dcd07ee_12 ......
ʹÓÃPHPµÄexecº¯Êýµ÷ÓÃlinuxµÄshellÃüÁÈçdateÈ¥ÐÞ¸Äʱ¼ä»òshutdownȥʵÏֹػú/ÖØÆô£¬µ«ÊÇ·µ»ØÖµ¶¼ÊÇʧ°ÜµÄ¡£¾¹ý¶à´ÎÊÔÑ飬È϶¨ÊÇûÓÐȨÏÞµÄÎÊÌâ¡£
ËùÒÔ£¬Ð¡µÜÔÚ´ËÇë½Ì¸÷룬ÈçºÎ²ÅÄÜÉèÖÃȨÏÞ£¬µ÷ÓÃlinux shellà ......
ÊÇÕâÑùµÄ£¬½ü¶ÎÔÚWINDOWSÉÏÉÏÍøʱ×ÜÊÇÓв¡¶¾£¬ÎÒ²»Ï°¹ßװɱ¶¾Èí¼þ£¬ÒÔǰҲһֱûװ¹ý£¬¾õµÃÂé·³¡£È»ºó¾ÍÓ²ÅÌ°²×°ÁËLINUX£¬»¹ºÃ£¬¿ÉÒÔÉÏÍø£¬¿ÉÒԲ鶫Î÷¡£µ«ÊÇÎÒÊÇÔÚWINDOWSÏÂ×öÈí¼þ¿ª·¢µÄ£¬»¹Ïë×°ÉÏWINDOWS£¬²»ÖªµÀÄÜ ......
linuxÏ°²×°ÁËjdk1.4µ«°æ±¾»¹ÊÇ1.3.1£¬ÓÖ°²×°Íê1.5ҲͬÑù°æ±¾»¹ÊÇ1.3.1 ÓÐÈ¥ÅäÖÃ.bashrcÎļþÄÚÈÝÈçÏ ¡¡¡¡¡¡
¡¡¡¡¡¡¡¡¡¡¡¡set JAVA_HOME=/usr/share/jdk1.5.0_05
¡¡¡¡¡¡¡¡¡¡¡¡export JAVA_HOME
¡¡¡¡ ......
ÎÒҪд¸ö·þÎñ¶Ë¡£ ÒªÇóͬʱ֧³Öwindows ºÍ linux Á½¸ö ϵͳ¡£ Ò²¾ÍÊÇҪдһ¸ö dllºÍÒ»¸öso Îļþ¡£ÓÉÓÚÎÒÒ»Ö±¶¼ÊÇÔÚwindsÏÂд³ÌÐò¡£linuxµÄ»¹²»»á¡£ Ïò´ó¼Ò×Éѯ ͬʱ Ö§³Ö dllºÍso Ó¦¸ÃÔõôд¡£
Óô¿c/c ......