TickCount Property
Collapse the table of content
Expand the table of content

Environment.TickCount Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets the number of milliseconds elapsed since the system started.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

public static int TickCount { get; }

Property Value

Type: System.Int32
A 32-bit signed integer containing the amount of time in milliseconds that has passed since the last time the computer was started.

The value of this property is derived from the system timer and is stored as a 32-bit signed integer. Consequently, if the system runs continuously, TickCount will increment from zero to Int32.MaxValue for approximately 24.9 days, then jump to Int32.MinValue, which is a negative number, then increment back to zero during the next 24.9 days.

TickCount is different from the Ticks property, which is the number of 100-nanosecond intervals that have elapsed since 1/1/0001, 12:00am.

Use the DateTime.Now property to obtain the current local date and time on this computer.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft