Back to index

lightning-sunbird  0.9+nobinonly
Defines
time_conversions.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define TIME_BEGIN_MACRO   do {
#define TIME_END_MACRO   } while(0);
#define FILETIME_1970   116444736000000000i64
#define FILETIME_ARITH(outFileTime, inFileTime, inOperation, inValue)
#define FILETIME_2_MICROSECONDS(outTime, inFileTime)
#define FILETIME_2_MILLISECONDS(outTime, inFileTime)
#define FILETIME_2_SECONDS(outTime, inFileTime)
#define SECONDS_2_FILETIME(outFileTime, inTime)
#define FILETIME_2_time_t(outTimeT, inFileTime)
#define time_t_2_FILETIME(outFileTime, inTimeT)
#define SYSTEMTIME_2_time_t(outTimeT, inSystemTime)
#define time_t_2_SYSTEMTIME(outSystemTime, inTimeT)
#define time_t_2_LOCALSYSTEMTIME(outSystemTime, inTimeT)

Define Documentation

#define FILETIME_1970   116444736000000000i64

Definition at line 52 of file time_conversions.h.

#define FILETIME_2_MICROSECONDS (   outTime,
  inFileTime 
)
Value:
TIME_BEGIN_MACRO \
        ULARGE_INTEGER buffer2; \
        \
        buffer2.LowPart = inFileTime.dwLowDateTime; \
        buffer2.HighPart = inFileTime.dwHighDateTime; \
        outTime = buffer2.QuadPart / 10i64; \
    TIME_END_MACRO

Definition at line 72 of file time_conversions.h.

#define FILETIME_2_MILLISECONDS (   outTime,
  inFileTime 
)
Value:
TIME_BEGIN_MACRO \
        ULARGE_INTEGER buffer3; \
        \
        buffer3.LowPart = inFileTime.dwLowDateTime; \
        buffer3.HighPart = inFileTime.dwHighDateTime; \
        outTime = buffer3.QuadPart / 10000i64; \
    TIME_END_MACRO

Definition at line 80 of file time_conversions.h.

#define FILETIME_2_SECONDS (   outTime,
  inFileTime 
)
Value:
TIME_BEGIN_MACRO \
        ULARGE_INTEGER buffer4; \
        \
        buffer4.LowPart = inFileTime.dwLowDateTime; \
        buffer4.HighPart = inFileTime.dwHighDateTime; \
        outTime = buffer4.QuadPart / 10000000i64; \
    TIME_END_MACRO

Definition at line 88 of file time_conversions.h.

#define FILETIME_2_time_t (   outTimeT,
  inFileTime 
)
Value:
TIME_BEGIN_MACRO \
        FILETIME result6; \
        ULONGLONG conversion6; \
        \
        FILETIME_ARITH(result6, inFileTime, -, FILETIME_1970); \
        FILETIME_2_SECONDS(conversion6, result6); \
        outTimeT = (time_t)conversion6; \
    TIME_END_MACRO

Definition at line 108 of file time_conversions.h.

#define FILETIME_ARITH (   outFileTime,
  inFileTime,
  inOperation,
  inValue 
)
Value:
TIME_BEGIN_MACRO \
        ULARGE_INTEGER buffer1; \
        \
        buffer1.LowPart = inFileTime.dwLowDateTime; \
        buffer1.HighPart = inFileTime.dwHighDateTime; \
        buffer1.QuadPart = buffer1.QuadPart inOperation inValue; \
        outFileTime.dwLowDateTime = buffer1.LowPart; \
        outFileTime.dwHighDateTime = buffer1.HighPart; \
    TIME_END_MACRO

Definition at line 57 of file time_conversions.h.

#define SECONDS_2_FILETIME (   outFileTime,
  inTime 
)
Value:
TIME_BEGIN_MACRO \
        ULARGE_INTEGER buffer5; \
        \
        buffer5.QuadPart = (ULONGLONG)inTime * 10000000i64; \
        outFileTime.dwLowDateTime = buffer5.LowPart; \
        outFileTime.dwHighDateTime = buffer5.HighPart; \
    TIME_END_MACRO

Definition at line 96 of file time_conversions.h.

#define SYSTEMTIME_2_time_t (   outTimeT,
  inSystemTime 
)
Value:
TIME_BEGIN_MACRO \
        FILETIME result8; \
        \
        SystemTimeToFileTime(&inSystemTime, &result8); \
        FILETIME_2_time_t(outTimeT, result8); \
    TIME_END_MACRO

Definition at line 129 of file time_conversions.h.

Definition at line 45 of file time_conversions.h.

Definition at line 46 of file time_conversions.h.

#define time_t_2_FILETIME (   outFileTime,
  inTimeT 
)
Value:
TIME_BEGIN_MACRO \
        FILETIME conversion7; \
        \
        SECONDS_2_FILETIME(conversion7, inTimeT); \
        FILETIME_ARITH(outFileTime, conversion7, +, FILETIME_1970); \
    TIME_END_MACRO

Definition at line 117 of file time_conversions.h.

#define time_t_2_LOCALSYSTEMTIME (   outSystemTime,
  inTimeT 
)
Value:
TIME_BEGIN_MACRO \
        FILETIME conversion10; \
        FILETIME localConversion10; \
        \
        time_t_2_FILETIME(conversion10, inTimeT); \
        FileTimeToLocalFileTime(&conversion10, &localConversion10); \
        FileTimeToSystemTime(&localConversion10, &outSystemTime); \
    TIME_END_MACRO

Definition at line 143 of file time_conversions.h.

#define time_t_2_SYSTEMTIME (   outSystemTime,
  inTimeT 
)
Value:
TIME_BEGIN_MACRO \
        FILETIME conversion9; \
        \
        time_t_2_FILETIME(conversion9, inTimeT); \
        FileTimeToSystemTime(&conversion9, &outSystemTime); \
    TIME_END_MACRO

Definition at line 136 of file time_conversions.h.