Files
exectos/xtoskrnl/includes/rtl/time.hh
Aiken Harris 439ea891ca
All checks were successful
Builds / ExectOS (amd64, debug) (push) Successful in -59m29s
Builds / ExectOS (amd64, release) (push) Successful in -59m30s
Builds / ExectOS (i686, debug) (push) Successful in -59m27s
Builds / ExectOS (i686, release) (push) Successful in -59m29s
Replace lookup-based time logic with direct epoch calculation formulas
2026-04-24 23:27:25 +02:00

36 lines
928 B
C++

/**
* 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];
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 */