VirtualBox

Changeset 25857 in vbox for trunk/include


Ignore:
Timestamp:
Jan 15, 2010 1:17:08 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56655
Message:

iprt/time.h: Fixed RTTimeSpecGetTimespec, RTTimeSpecGetDosSeconds and RTTimeSpecSetDosSeconds.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/time.h

    r25853 r25857  
    393393    {
    394394        i32Nano += 1000000000;
    395         i64++;
     395        i64--;
    396396    }
    397397    pTimespec->tv_sec = (time_t)i64;
     
    489489DECLINLINE(int64_t) RTTimeSpecGetDosSeconds(PCRTTIMESPEC pTime)
    490490{
    491     return (pTime->i64NanosecondsRelativeToUnixEpoch + RTTIME_OFFSET_DOS_TIME)
     491    return (pTime->i64NanosecondsRelativeToUnixEpoch - RTTIME_OFFSET_DOS_TIME)
    492492        / 1000000000;
    493493}
     
    504504{
    505505    pTime->i64NanosecondsRelativeToUnixEpoch = i64Seconds * 1000000000
    506         - RTTIME_NT_TIME_OFFSET_UNIX;
     506        + RTTIME_OFFSET_DOS_TIME;
    507507    return pTime;
    508508}
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette