TimeSpan structure

Applies to Windows and Windows Phone

Represents a time interval as a signed 64-bit integer value.

.NET:  This structure appears as System.TimeSpan.

Syntax


var timeSpan = {
    duration : /* Your value */
}

Attributes

[Version(0x06020000)]

Members

The TimeSpan structure has these fields.

FieldData typeDescription
Duration | duration

Number [JavaScript] | int64 [C++]

A time period expressed in 100-nanosecond units.

 

Remarks

When building Windows Store apps with the Microsoft .NET Framework, this structure is hidden and developers should use the System.TimeSpan structure.

In JavaScript, this structure is accessed as a value, not as an object. For example, use var a = 10000, not var a = { duration: 10000 }.

Note   In JavaScript, this structure is treated as the number of millisecond intervals, not the number of 100-nanosecond intervals. Therefore, Windows.Foundation.TimeSpan values can lose precision when being ported between languages.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows.Foundation
Windows::Foundation [C++]

Metadata

Windows.winmd

 

 

Show:
© 2014 Microsoft