从System.Environment.TickCount 看最大支持,机子开一开还是要重启一下的

System.Environment.TickCount 最大支持49.2天而已

超过了,系统则返回负数

 

关于开机时间
看MSDN
//   Sample   for   the   Environment.TickCount   property.

//   TickCount   cycles   between   Int32.MinValue,   which   is   a   negative  
//   number,   and   Int32.MaxValue   once   every   49.8   days.   This   sample
//   removes   the   sign   bit   to   yield   a   nonnegative   number   that   cycles  
//   between   zero   and   Int32.MaxValue   once   every   24.9   days.

using   System;

class   Sample  
{
        public   static   void   Main()  
        {
        int   result   =   Environment.TickCount   &   Int32.MaxValue;
        Console.WriteLine( "TickCount:   {0} ",   result);
        }
}
/*
This   example   produces   the   following   results:

TickCount:   101931139
*/

 

 

微软的机子开一开还是要重启一下的。。。

 

posted @ 2010-10-14 14:15  yellowyu  阅读(1617)  评论(2编辑  收藏  举报