Ejemplo n.º 1
0
CDateTimeSpan CDateTimeSpan::operator +(const CDateTimeSpan& right) const
{
    CDateTimeSpan left(*this);

    ULARGE_INTEGER timeLeft;
    left.ToULargeInt(timeLeft);

    ULARGE_INTEGER timeRight;
    right.ToULargeInt(timeRight);

    timeLeft.QuadPart+=timeRight.QuadPart;

    left.FromULargeInt(timeLeft);

    return left;
}
Ejemplo n.º 2
0
CDateTimeSpan CDateTime::operator -(const CDateTime& right) const
{
    CDateTimeSpan left;

    ULARGE_INTEGER timeLeft;
    left.ToULargeInt(timeLeft);

    ULARGE_INTEGER timeThis;
    ToULargeInt(timeThis);

    ULARGE_INTEGER timeRight;
    right.ToULargeInt(timeRight);

    timeLeft.QuadPart=timeThis.QuadPart-timeRight.QuadPart;

    left.FromULargeInt(timeLeft);

    return left;
}