Implement time conversion routines for Unix and XT epoch formats
This commit is contained in:
36
xtoskrnl/includes/rtl/time.hh
Normal file
36
xtoskrnl/includes/rtl/time.hh
Normal file
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* PROJECT: ExectOS
|
||||
* COPYRIGHT: See COPYING.md in the top level directory
|
||||
* FILE: xtoskrnl/includes/rtl/time.hh
|
||||
* DESCRIPTION: Time conversion support
|
||||
* DEVELOPERS: Aiken Harris <harraiken91@gmail.com>
|
||||
*/
|
||||
|
||||
#ifndef __XTOSKRNL_RTL_TIME_HH
|
||||
#define __XTOSKRNL_RTL_TIME_HH
|
||||
|
||||
#include <xtos.hh>
|
||||
|
||||
|
||||
/* Runtime Library */
|
||||
namespace RTL
|
||||
{
|
||||
class Time
|
||||
{
|
||||
private:
|
||||
STATIC CUSHORT DaysInMonth[2][12];
|
||||
STATIC CUSHORT DaysPrecedingMonth[2][12];
|
||||
|
||||
public:
|
||||
STATIC XTAPI XTSTATUS TimeFieldsToUnixEpoch(IN PTIME_FIELDS TimeFields,
|
||||
OUT PLONGLONG UnixTime);
|
||||
STATIC XTAPI XTSTATUS TimeFieldsToXtEpoch(IN PTIME_FIELDS TimeFields,
|
||||
OUT PLARGE_INTEGER XtTime);
|
||||
|
||||
private:
|
||||
STATIC XTFASTCALL BOOLEAN LeapYear(SHORT Year);
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* __XTOSKRNL_RTL_TIME_HH */
|
||||
Reference in New Issue
Block a user