version 1.17, 2002/05/01 05:15:06
|
version 1.22, 2002/05/09 21:08:55
|
|
|
| |
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
#include <Pegasus/Common/Array.h> | #include <Pegasus/Common/Array.h> |
|
#include <time.h> |
#ifdef PEGASUS_INTERNALONLY | #ifdef PEGASUS_INTERNALONLY |
#include <iostream> | #include <iostream> |
#endif | #endif |
|
|
static CIMDateTime getCurrentDateTime(); | static CIMDateTime getCurrentDateTime(); |
| |
/** | /** |
Get the difference between two CIMDateTimes. |
Get the difference between two CIMDateTimes. This function computes the |
|
difference between two datetimes or between two intervals. The result |
|
is truncated and returned as the number of seconds. |
| |
@param startTime Contains the start time. | @param startTime Contains the start time. |
| |
|
|
@throws BadFormat | @throws BadFormat |
| |
*/ | */ |
static Real64 getDifference(CIMDateTime startTime, CIMDateTime finishTime); |
static Sint64 getDifference(CIMDateTime startTime, CIMDateTime finishTime); |
| |
/** | /** |
Checks whether the datetime is an interval. | Checks whether the datetime is an interval. |
|
|
*/ | */ |
Boolean isInterval(); | Boolean isInterval(); |
| |
#ifdef PEGASUS_INTERNALONLY |
|
private: | private: |
| |
enum { FORMAT_LENGTH = 25 }; | enum { FORMAT_LENGTH = 25 }; |
| |
|
char _rep[FORMAT_LENGTH + 1]; |
|
|
|
#ifdef PEGASUS_INTERNALONLY |
// | // |
// Length of the string required to store only the date and time without | // Length of the string required to store only the date and time without |
// the UTC sign and UTC offset. | // the UTC sign and UTC offset. |
|
|
| |
Boolean _set(const char* str); | Boolean _set(const char* str); |
| |
char _rep[FORMAT_LENGTH + 1]; |
|
|
|
/** | /** |
This function extracts the different components of the date and time | This function extracts the different components of the date and time |
from the string passed and assigns it to the tm structure. | from the string passed and assigns it to the tm structure. |