WBEMTimeSpan class

[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.

WBEMTimeSpan has these types of members:

Constructors

The WBEMTimeSpan class has these constructors.
Constructor Description
WBEMTimeSpan Constructor that creates a time span object.
 

Methods

The WBEMTimeSpan class has these methods.
Method Description
Clear Sets the time span to INVALID_TIME.
GetBSTR Gets the time span as a BSTR in WMI time span format.
GetTime Returns the time span as a 64-bit integer.
IsOk Indicates whether the WBEMTimeSpan object represents a valid time span.

Methods

The WBEMTimeSpan class has these methods.

Method Description
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::WBEMTimeSpan The WBEMTimeSpan class constructor creates a time span object. The constructor is overloaded.
WBEMTimeSpan::WBEMTimeSpan This WBEMTimeSpan class constructor creates a time span object from a BSTR in Interval Format.
WBEMTimeSpan::WBEMTimeSpan This WBEMTimeSpan class constructor creates a time span object from an integer number of elapsed days.
WBEMTimeSpan::WBEMTimeSpan The WBEMTimeSpan class constructor creates a time span object. The constructor is overloaded.
WBEMTimeSpan::WBEMTimeSpan The WBEMTimeSpan class constructor creates a time span object. The constructor is overloaded.
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 a not equal comparison operator.
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< 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= Converts a BSTR time interval value to a WBEMTimeSpan object in CIM date and time format.
WBEMTimeSpan::operator= Converts a BSTR time interval value to a WBEMTimeSpan object in CIM date and time format.
WBEMTimeSpan::operator-= Compares two WBEMTimeSpan objects using the subtract and assign operator (–=).
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= Converts a BSTR time interval value to a WBEMTimeSpan object in CIM date and time format.

Requirements

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

See also

WBEMTime Class Methods