WBEMTimeSpan class (wbemtime.h)

[The WBEMTimeSpan class is part of the WMI Provider Framework which is now considered in final state, and no further development, enhancements, or updates will be available for non-security related issues affecting these libraries. The MI APIs should be used for all new development.]

The WBEMTimeSpan class holds time spans in nanoseconds.WBEMTimeSpan objects can result from the arithmetic manipulation of WBEMTime objects. For example, subtracting one WBEMTime object from another results in a WBEMTimeSpan object that represents the difference in time between the two objects. Instances of WBEMTimeSpan can also be used to wrap any data that has an inherent duration, such as the time that remains until a password expires.

Methods

The WBEMTimeSpan class has these methods.

 
WBEMTimeSpan::Clear

The Clear method sets the time span to INVALID_TIME.
WBEMTimeSpan::GetBSTR

The GetBSTR method gets the time span as a BSTR in Date and Time format.
WBEMTimeSpan::GetTime

The GetTime method returns the time span as a 64-bit integer.
WBEMTimeSpan::IsOk

The IsOk method indicates whether the WBEMTimeSpan object represents a valid time span.
WBEMTimeSpan::operator+

The WBEMTimeSpan class add operator adds one time span to another, placing the sum in a new WBEMTimeSpan object returned by the method.
WBEMTimeSpan::operator+=

The WBEMTimeSpan class add-and-assign operator adds one time span to another. The operation create a new time span that contains the resulting time.
WBEMTimeSpan::operator=

Converts a BSTR time interval value to a WBEMTimeSpan object in CIM date and time format. (overload 2/3)
WBEMTimeSpan::operator=

Converts a BSTR time interval value to a WBEMTimeSpan object in CIM date and time format. (overload 1/3)
WBEMTimeSpan::operator=

Converts a BSTR time interval value to a WBEMTimeSpan object in CIM date and time format. (overload 3/3)
WBEMTimeSpan::operator==

Compares two WBEMTimeSpan objects using an equal comparison operator.
WBEMTimeSpan::operator>

Compares two WBEMTimeSpan objects using a greater than comparison operator.
WBEMTimeSpan::operator>=

Compares two WBEMTimeSpan objects using a greater than or equal comparison operator.
WBEMTimeSpan::operator<

Compares two WBEMTimeSpan objects using a less than comparison operator.
WBEMTimeSpan::operator<=

Compares two WBEMTimeSpan objects using a less than or equal comparison operator.
WBEMTimeSpan::operator!=

Compares two WBEMTimeSpan objects using a not equal comparison operator.
WBEMTimeSpan::operator-

The WBEMTimeSpan class subtract operator (�) subtracts a time span from the object on which the method is executed.
WBEMTimeSpan::operator-=

Compares two WBEMTimeSpan objects using the subtract and assign operator (�=).
WBEMTimeSpan::WBEMTimeSpan

The WBEMTimeSpan class constructor creates a time span object. The constructor is overloaded. (WBEMTimeSpan::WbemTimeSpan)
WBEMTimeSpan::WBEMTimeSpan

This WBEMTimeSpan class constructor creates a time span object from a BSTR in Interval Format.
WBEMTimeSpan::WBEMTimeSpan

The WBEMTimeSpan class constructor creates a time span object. The constructor is overloaded. (overload 1/3)
WBEMTimeSpan::WBEMTimeSpan

The WBEMTimeSpan class constructor creates a time span object. The constructor is overloaded. (overload 2/3)
WBEMTimeSpan::WBEMTimeSpan

This WBEMTimeSpan class constructor creates a time span object from an integer number of elapsed days.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header wbemtime.h

See also

WBEMTime Class Methods