This document is archived and information here might be outdated.  Recommended version.


ITimeDuration Interface (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (System)  

ITimeDuration Interface

Provides access to members that control the Time Duration.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

The ITimeDuration interface is used to deal with time values which are simply a length of time, but not associated with a specific point in time.  For example, 3 hours is a TimeDuration since it does not tell you if it represents 1:00-4:00 or 5:00-8:00.  If you need to associate the TimeDuration with a specific point on the time line, you should use a TimeExtent.

Members

Description
Method AddDays Adds the input amount of days to the time duration.
Method AddDuration Adds a time duration.
Method AddHours Adds the input amount of hours to the time duration.
Method AddMilliseconds Adds the input amount of milliseconds to the time duration.
Method AddMinutes Adds the input amount of minutes to the time duration.
Method AddNanoseconds Adds the input amount of nanoseconds to the time duration.
Method AddSeconds Adds the input amount of seconds to the time duration.
Method AddWeeks Adds the input amount of weeks to the time duration.
Method Compare Compares this time duration to the other time duration. Returns -1 if this time duration's value is less, 1 if greater, and 0 otherwise.
Read/write property Days The time duration days component.
Read/write property Hours The time duration hours component.
Method IsZero Indicates whether the time duration's value is zero.
Read/write property Minutes The time duration minutes component.
Read/write property Nanoseconds The time duration nanoseconds component.
Read/write property Positive Indicates whether the time duration value is positive or negative.
Method QueryDayFraction The time duration day fraction portion as a day fraction. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.
Method QueryDayFractionNanoseconds The time duration day fraction portion as the number of nanoseconds elapsed since midnight. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.
Method QueryTicks Obtains the time duration as the number of ticks.
Method QueryTotalDays Obtains the time duration as total days floating point value.
Method QueryTotalHours Obtains the time duration as total hours floating point value.
Method QueryTotalMinutes Obtains the time duration as total minutes floating point value.
Method QueryTotalSeconds Obtains the time duration as total seconds floating point value.
Method QueryWKSTimeDuration Obtains time as a WKSTimeDuration.
Method QueryXMLTimeDurationString Obtains the time duration as an XML time duration string.
Method Reset Reset the time duration to zero.
Method Scale Scales the time duration by a scale factor.
Read/write property Seconds The time duration seconds component.
Method SetDayFraction The time duration day fraction portion as a day fraction. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.
Method SetDayFractionNanoseconds The time duration day fraction portion as the number of nanoseconds elapsed since midnight. Corresponds to the Hour, Minute, Second, and Nanoseconds properties.
Method SetFromTicks Writes the time duration from a given number of ticks.
Method SetFromWKSTimeDuration Writes the time from a given WKSTimeDuration value.
Method SetFromXMLTimeDurationString Writes the time duration from an XML time duration string.
Method SubtractDuration Subtracts a time duration.

CoClasses that implement ITimeDuration

CoClasses and Classes Description
TimeDuration An object that represents a time duration value.