JAVAϵĶàÏ̳߳ÌÐòÔì³ÉϵͳʱÖÓ±ä¿ì
ÔÎĵØÖ·:
http://blog.csdn.net/luozhenyu/archive/2008/11/07/3247740.aspx
×î½üµÄÒ»¸öÏîÄ¿£¬²ÉÓÃJSP+Servlet¿ª·¢µÄWebÓ¦Ó㬹¦Äܲ»¸´ÔÓ£¬Éæ¼°µ½Ò»Ð©¶àÏ̴߳¦Àí¼°ÍøÂç±à³Ì¡£²âÊÔÆڼ䷢ÏÖÔÚ»áÔì³ÉϵͳʱÖÓ±ä¿ì£¬»ù±¾ÔËÐв»µ½Ò»Ð¡Ê±¾Í¿ìÁË10À´·ÖÖÓ£¬¿ª³öʱÖÓ³ÌÐòÄÜÃ÷ÏԸоõÃëÖÓÌø¶¯±È½Ï¿ì¡£¼ì²é¹ý´úÂëûÓÐÓõ½ÈκÎÓйØʱ¼äÉèÖõĵ÷Óã¬JVM¡¢TOMCATÒ²»»¹ý¶à¸ö°æ±¾£¬ÒÀȻûÄܽâ¾öÎÊÌâ¡£ÓÉÓÚÎÒÃǵÄÏîÄ¿³ÌÐò²»ÔËÐÐʱϵͳʱÖÓÒ»ÇÐÕý³££¬Æô¶¯ºóÁ¢¿Ì±ä¿ì£¬³õ²½Ó²¼þ»òÊÇÆäËû³ÌÐòÔì³ÉµÄÎÊÌâ¡£ÁíÍ⣬×îÆæ¹ÖµÄÊDz¢²»ÊÇËùÓлúÆ÷ÉÏÔËÐж¼ÓÐÕâÖÖÎÊÌ⣬¹«Ë¾ÀïµÄ3̨2003ServerÉÏ£¬2̨ÓдËÏÖÏó£¬Áíһ̨ʼÖÕÕý³££¬¿ª·¢ÓõÄһЩxp/vistaµÄ»úÆ÷Ò²²»¶¼´æÔÚÕâ¸öÎÊÌâ¡£
×ÅʵÓôÃÆÁ˺ܳ¤Ò»¶Îʱ¼ä£¬Ê¼ÖÕÕÒ²»µ½ÎÊÌâµÄ¹Ø¼ü£¬¸üû·¨ÕÒµ½½â¾ö°ì·¨¡£Ç°Á½ÌìżȻ²éµ½Ò»ÆªSUNÍøÕ¾bug¿âÖÐÔçЩÄêµÄһƪÎÄÕ£º(ID:4500388)Calling Thread.sleep with small argument affects system clock on windows £¬ÆäÖÐ˵Ã÷Á˵±¶àÏ̴߳¦Àíʱ£¬µ÷ÓÃThread.sleep()·½·¨Ê±£¬ÈôsleepµÄ²ÎÊýСÓÚ10ms¾Í¿ÉÄÜ»áÔì³ÉwindowsϵͳʱÖÓ±ä¿ì¡£²»¹ý¸Ãbug±ê¼ÇΪjvm 1.3ÖвŴæÔÚ£¬²¢ÇÒÒѾÔÚºóÐø°æ±¾fixed£¬¶øÎÒÃÇ¿ª·¢¶¼ÊÇÓõÄ1.6°æ±¾¡£ÓÚÊÇËÑË÷ÁËÏÂÏîÄ¿´úÂ룬ȷʵÓÐÓõ½Thread.sleep()·½·¨µÄµØ·½£¬¶øÇÒijЩ²¿·ÖÓÉÓÚÐèÇó¹Øϵ£¬³ÌÐòÖеIJÎÊý²»¶¨µÄ£¬»áÒÀ¾ÝÒ»¶¨Ëã·¨¼ÆËã³öÀ´£¬ÕâÑù¾ÍÓпÉÄÜСÓÚ10ms£¬¾¡¹ÜÀíÂÛÉÏÎÒÃÇ´úÂëÖпÉÄÜ×îСֻÉ趨µ½50ms×óÓÒ¡£
½ÓÏÂÀ´¼ÌÐøËÑÁËÏÂÆäËûµÄbug report£¬°üÀ¨IDΪ5005837 ¡¢6435126µÄÎÄÕ£¬·¢ÏÖÉÏÊöÎÊÌⲢδ¸ù±¾½â¾ö¡£¸ù¾ÝÎÄÕÂÖÐÌáµ½µÄForceTimeHighResolution¹Ø¼ü×Ögoogleһϣ¬·¢ÏÖÕâ¸ö²ÎÊýÊÇJVM ÖеÄÒ»¸ö£»ÁíÍâËѵ½ÀÏÍâµÄÌû×ÓÀïÓÐһƪ¹ØÓÚappletÓÎÏ·³ÌÐòʱÖÓ×ß¿ìºó£¬Æ䳧É̸ø³öµÄ½â¾ö°ì·¨£¬¾ÍÊÇÐèÒª¿ªÆôForceTimeHighResolution²ÎÊý£¡
ÕâϺÃÁË£¬ÕâÓ¦¸Ã¾ÍÊǽâ¾öÎÊÌâµÄ¹Ø¼üËùÔÚ¡£ÖØн«ÏîÄ¿·þÎñÆ÷ʱ¼äУ׼£¬È»ºóÔÚTOMCATµÄcatalina.batÖн«JAVA_OPTS²ÎÊýÖÐÔö¼ÓÒ»Ïî -XX:+ForceTimeHighResolution (×¢Òâ - ºÍ + ¶¼ÊÇÓеÄ)£¬Æô¶¯TOMCATÔËÐС£²é¿´Ê±ÖÓ£¬¸Ð¾õûÓбä¿ì£¬ÔËÐÐ1Сʱºó£¬Î´·¢ÏÖ±ä¿ìÏÖÏ󣬿´À´Õâ¸ö²ÎÊýȷʵºÜÓÐЧ¡£Ê£Ï¹¤×÷¾ÍÊÇ°ÑËùÓа²×°ÏîÄ¿³ÌÐòµÄ·þÎñÆ÷¶¼ÐÞ¸ÄÁ˲ÎÊýÉèÖ㬽øÐг¤Ê±¼äÔËÐвâÊÔ£¬Ö±ÖÁĿǰΪֹ£¬¾ùδÔÚ³öÏÖʱÖÓ±ä¿ìµÄÏÖÏó¡£
ûÏëµ½JVM»¹ÓÐÕâÑùµÄBUG¡£ÖÁÓÚ³ÌÐòÖпªÆôÁËForceTimeHighResolutionÕâ¸ö²ÎÊý»á²»»á´øÀ´±ð·½ÃæÎÊÌ⣬»¹ÎÞ´ÓµÃÖª£¬Ö»Óдýʱ¼äÀ´¼ìÑéÁË¡
Ïà¹ØÎĵµ£º
21 Àà = Óò + ·½·¨
Óò = Êý¾Ý
·½·¨ = ¹¦ÄÜ
22 ÒýÓÃÊý¾ÝÀàÐͱäÁ¿µÄËĸöÊôÐÔ£º¢Ù±äÁ¿Ãû ¢ÚÊý¾ÝÀàÐÍ ¢Û´æ´¢µ¥Ôª ¢Ü±äÁ¿Öµ
23 ÔÚÒýÓÃÊý¾ÝÀàÐͱäÁ¿´æ´¢µ¥ÔªÄÚ´æ·ÅµÄ±äÁ¿ÖµÊÇÒýÓ㬼´Ö¸ÏòÊ ......
¡¾ÎÄÕ±êÌâ¡¿javaС³ÌÐò£¨1£©
¡¾ÎÄÕÂ×÷Õß¡¿Ôø½¡Éú
¡¾×÷ÕßÓÊÏä¡¿zengjiansheng1@126.com
¡¾×÷ÕßQQ¡¿190678908
¡¾×÷ÕßÉùÃ÷¡¿±¾ÈËˮƽÓÐÏÞ£¬Ê§ÎóÖ®´¦£¬¾´Çë¸÷λָ³ö¡£±¾ÈËÒÔǰдµÄһЩС³ÌÐò£¬·ÖÏíÒ»ÏÂÏ£Íû¶Ô¸÷λѧϰjavaÓаïÖú ^-^
***************************************************************************** ......
¡¾ÎÄÕ±êÌâ¡¿javaС³ÌÐò£¨3£©
¡¾ÎÄÕÂ×÷Õß¡¿Ôø½¡Éú
¡¾×÷ÕßÓÊÏä¡¿zengjiansheng1@126.com
¡¾×÷ÕßQQ¡¿190678908
¡¾×÷ÕßÉùÃ÷¡¿±¾ÈËˮƽÓÐÏÞ£¬Ê§ÎóÖ®´¦£¬¾´Çë¸÷λָ³ö¡£±¾ÈËÒÔǰдµÄһЩС³ÌÐò£¬·ÖÏíÒ»ÏÂÏ£Íû¶Ô¸÷λѧϰjavaÓаïÖú ^-^
***************************************************************************** ......
JavaÓï·¨×ܽá - Ïß³Ì
Ò»Ìáµ½Ï̺߳ÃÏñÊǼþºÜÂé·³ºÜ¸´ÔÓµÄÊ£¬ÊÂʵÉÏȷʵÈç´Ë£¬Éæ¼°µ½Ï̵߳ıà³ÌÊǺܽ²¾¿¼¼Çɵġ£Õâ¾ÍÐèÒªÎÒÃDZ任˼ά·½Ê½£¬Á˽âÏ̻߳úÖƵıȽÏͨÓõļ¼ÇÉ£¬Ð´³ö¸ßЧµÄ¡¢²»ÒÀÀµÓÚij¸öJVMʵÏֵijÌÐòÀ´¡£±Ï¾¹½ö½ö¾ÍJava¶øÑÔ£¬¸÷¸öÐéÄâ»úµÄʵÏÖÊDz»Í¬µÄ¡£Ñ§Ï°Ïß³Ìʱ£¬×îÁîÎÒÓ¡ÏóÉî¿ÌµÄ¾ÍÊÇÄÇÖÖ²»È·¶¨ÐÔ¡¢Ã»Óб£ ......