Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TimeSpan structure

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

.NET:  When programming with .NET, this structure is hidden and developers should use the System.TimeSpan type.

Syntax


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

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 programming with .NET, 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, TimeSpan values interpreted as Number are 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 (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.FoundationContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.FoundationContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

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

Attributes

[Version(0x06020000)]

See also

DateTime
System.TimeSpan

 

 

Show:
© 2015 Microsoft