uLib  User mode C/C++ extended API library for Win32 programmers.

Module Description

Some FILETIME functions.
Written to support the Due time of SetWaitableTimer(), but has other uses as well.
See also TWaitTimer

Enumerations

enum  eTimeType { LOCAL_TIME = 0, SYSTEM_TIME }
 

Functions

FILETIME Now (eTimeType Domain=LOCAL_TIME)
 
FILETIME AddTime (IN FILETIME Time, SHORT Hr, SHORT Min, SHORT Sec, SHORT mSec)
 
FILETIME AddFiletime (FILETIME Time, const FILETIME Add)
 
FILETIME MakeDateTime (WORD Year, WORD Month, WORD Day, WORD Hr, WORD Min, WORD Sec)
 
bool operator > (FILETIME const &A, FILETIME const &B)
 
bool operator< (FILETIME const &A, FILETIME const &B)
 
bool operator >= (FILETIME const &A, FILETIME const &B)
 
bool operator<= (FILETIME const &A, FILETIME const &B)
 
bool operator== (FILETIME const &A, FILETIME const &B)
 
bool operator != (FILETIME const &A, FILETIME const &B)
 

Variables

const FILETIME NullFileTime
 

Enumeration Type Documentation

◆ eTimeType

enum eTimeType

Time type for the Now() function.

Enumerator
LOCAL_TIME 

GetLocalTime().

SYSTEM_TIME 

UTC : GetSystemTime().

Definition at line 709 of file UtilFunc.h.

Function Documentation

◆ Now()

FILETIME Now ( eTimeType  Domain = LOCAL_TIME)

Now() returns a FILETIME representing the current moment in time.

Definition at line 549 of file KernelUtil.cpp.

◆ AddTime()

FILETIME AddTime ( IN FILETIME  Time,
SHORT  Hr,
SHORT  Min,
SHORT  Sec,
SHORT  mSec 
)

AddTime() adds or subtracts time from a FILETIME.
Very handy for SetWaitableTimer( Due, ... ).

◆ AddFiletime()

FILETIME AddFiletime ( FILETIME  Time,
const FILETIME  Add 
)

Definition at line 595 of file KernelUtil.cpp.

◆ MakeDateTime()

FILETIME MakeDateTime ( WORD  Year,
WORD  Month,
WORD  Day,
WORD  Hr,
WORD  Min,
WORD  Sec 
)

MakeDateTime defines a specific FILETIME.
Very handy for SetWaitableTimer( Due, ... ).

Definition at line 606 of file KernelUtil.cpp.

◆ operator >()

bool operator > ( FILETIME const &  A,
FILETIME const &  B 
)

Definition at line 625 of file KernelUtil.cpp.

◆ operator<()

bool operator< ( FILETIME const &  A,
FILETIME const &  B 
)

Definition at line 630 of file KernelUtil.cpp.

◆ operator >=()

bool operator >= ( FILETIME const &  A,
FILETIME const &  B 
)

Definition at line 640 of file KernelUtil.cpp.

◆ operator<=()

bool operator<= ( FILETIME const &  A,
FILETIME const &  B 
)

Definition at line 644 of file KernelUtil.cpp.

◆ operator==()

bool operator== ( FILETIME const &  A,
FILETIME const &  B 
)

Definition at line 635 of file KernelUtil.cpp.

◆ operator !=()

bool operator != ( FILETIME const &  A,
FILETIME const &  B 
)

Definition at line 648 of file KernelUtil.cpp.

Variable Documentation

◆ NullFileTime

const FILETIME NullFileTime

Definition at line 547 of file KernelUtil.cpp.