Fan.Sys.Duration.now C# (CSharp) Méthode

now() public static méthode

public static now ( ) : Duration
Résultat Duration
        public static Duration now()
        {
            // TODO - need to be like System.nanoTime()
              /*
              Brian: you want to find whatever wraps getTickCount
              (or call the win32 function directly) 10:40PM Mon

              Brian: there is also QueryPerformanceCounter, you
              might want to check what System.nanoTime does for
              win32 in the HotSpot cod
              */

              return new Duration(System.DateTime.Now.Ticks * 100);
        }

Usage Example

Exemple #1
0
        //////////////////////////////////////////////////////////////////////////
        // Boot Times
        //////////////////////////////////////////////////////////////////////////

        private static Duration initBootDuration()
        {
            try
            {
                return(Duration.now());
            }
            catch (Exception e)
            {
                throw initFail("bootDuration", e);
            }
        }