Ignore:
Timestamp:
Sep 21, 2017, 5:11:07 PM (8 years ago)
Author:
bird
Message:

kmk,lib: ported kmk_touch to windows (nt).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/nt/nthlp.h

    r3009 r3060  
    8989
    9090
     91static __inline void birdNtTimeToTimeVal(__int64 iNtTime, BirdTimeVal_T *pTimeVal)
     92{
     93    iNtTime -= BIRD_NT_EPOCH_OFFSET_UNIX_100NS;
     94    pTimeVal->tv_sec  = iNtTime / 10000000;
     95    pTimeVal->tv_usec = (iNtTime % 10000000) / 10;
     96}
     97
     98
     99static __inline __int64 birdNtTimeFromTimeVal(BirdTimeVal_T const *pTimeVal)
     100{
     101    __int64 iNtTime = pTimeVal->tv_sec * 10000000;
     102    iNtTime += pTimeVal->tv_usec * 10;
     103    iNtTime += BIRD_NT_EPOCH_OFFSET_UNIX_100NS;
     104    return iNtTime;
     105}
     106
     107
    91108#endif
    92109
Note: See TracChangeset for help on using the changeset viewer.