Now.Ticks : Now « System « VB.Net by API






Now.Ticks

  

Public Class Tester
    Public Shared Sub Main
        Dim ticksBefore As Long
        Dim ticksAfter As Long
        Dim tickSeconds As Double

        ticksBefore = Now.Ticks
        MsgBox("Press OK to see elapsed seconds")
        ticksAfter = Now.Ticks

        tickSeconds = (ticksAfter - ticksBefore) / 10000000.0
        Console.WriteLine("Elapsed seconds: " & tickSeconds.ToString())

    End Sub

End Class

   
    
  








Related examples in the same category

1.Now.DayOfWeek
2.Now.ToLongTimeString
3.Now.ToString
4.Now.ToUniversalTime