ReactOS 0.4.16-dev-732-g2d1144a
time.h File Reference
#include <corecrt.h>
#include <corecrt_wtime.h>
Include dependency graph for time.h:

Go to the source code of this file.

Classes

struct  _timespec32
 
struct  _timespec64
 
struct  timespec
 

Macros

#define _INC_TIME
 
#define _CRT_USE_CONFORMING_ANNEX_K_TIME   0
 
#define CLOCKS_PER_SEC   ((clock_t)1000)
 
#define TIME_UTC   1
 
#define _daylight   (*__daylight())
 
#define _dstbias   (*__dstbias())
 
#define _timezone   (*__timezone())
 
#define _tzname   (__tzname())
 

Typedefs

typedef long clock_t
 

Functions

_Check_return_ _CRT_INSECURE_DEPRECATE_GLOBALS (_get_daylight) _ACRTIMP int *__cdecl __daylight(void)
 
_Check_return_ _CRT_INSECURE_DEPRECATE_GLOBALS (_get_dstbias) _ACRTIMP long *__cdecl __dstbias(void)
 
_Check_return_ _CRT_INSECURE_DEPRECATE_GLOBALS (_get_timezone) _ACRTIMP long *__cdecl __timezone(void)
 
_Check_return_ _Deref_ret_z_ _CRT_INSECURE_DEPRECATE_GLOBALS (_get_tzname) _ACRTIMP char **__cdecl __tzname(void)
 
 _Success_ (_Daylight !=0) _ACRTIMP errno_t __cdecl _get_daylight(_Out_ int *_Daylight)
 
 _Success_ (_DaylightSavingsBias !=0) _ACRTIMP errno_t __cdecl _get_dstbias(_Out_ long *_DaylightSavingsBias)
 
 _Success_ (_TimeZone !=0) _ACRTIMP errno_t __cdecl _get_timezone(_Out_ long *_TimeZone)
 
 _Success_ (return==0) _ACRTIMP errno_t __cdecl _get_tzname(_Out_ size_t *_ReturnValue
 Deletes the virtual mapping and optionally gives back the page & dirty bit.
 
 _Out_writes_z_ (_SizeInBytes) char *_Buffer
 
 _Success_ (return !=0) _Ret_writes_z_(26) _Check_return_ _CRT_INSECURE_DEPRECATE(asctime_s) _ACRTIMP char *__cdecl asctime(_In_ struct tm const *_Tm)
 
 __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1 (errno_t, asctime_s, _Post_readable_size_(26) char, _Buffer, _In_ struct tm const *, _Time) _Check_return_ _ACRTIMP clock_t __cdecl clock(void)
 
_Check_return_wat_ _ACRTIMP errno_t __cdecl _ctime32_s (_Out_writes_(_SizeInBytes) _Post_readable_size_(26) char *_Buffer, _In_range_(>=, 26) size_t _SizeInBytes, _In_ __time32_t const *_Time)
 
 __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1 (errno_t, _ctime32_s, _Post_readable_size_(26) char, _Buffer, _In_ __time32_t const *, _Time) _Ret_z_ _Success_(return !=0) _Check_return_ _CRT_INSECURE_DEPRECATE(_ctime64_s) _ACRTIMP char *__cdecl _ctime64(_In_ __time64_t const *_Time)
 
_Check_return_wat_ _ACRTIMP errno_t __cdecl _ctime64_s (_Out_writes_z_(_SizeInBytes) _Post_readable_size_(26) char *_Buffer, _In_range_(>=, 26) size_t _SizeInBytes, _In_ __time64_t const *_Time)
 
 __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1 (errno_t, _ctime64_s, _Post_readable_size_(26) char, _Buffer, _In_ __time64_t const *, _Time) _Check_return_ _ACRTIMP double __cdecl _difftime32(_In_ __time32_t _Time1
 
_Check_return_ _ACRTIMP double __cdecl _difftime64 (_In_ __time64_t _Time1, _In_ __time64_t _Time2)
 
_Check_return_wat_ _ACRTIMP errno_t __cdecl _gmtime32_s (_Out_ struct tm *_Tm, _In_ __time32_t const *_Time)
 
_Check_return_wat_ _ACRTIMP errno_t __cdecl _gmtime64_s (_Out_ struct tm *_Tm, _In_ __time64_t const *_Time)
 
_Check_return_wat_ _ACRTIMP errno_t __cdecl _localtime32_s (_Out_ struct tm *_Tm, _In_ __time32_t const *_Time)
 
_Check_return_wat_ _ACRTIMP errno_t __cdecl _localtime64_s (_Out_ struct tm *_Tm, _In_ __time64_t const *_Time)
 
_Check_return_ _ACRTIMP __time32_t __cdecl _mkgmtime32 (_Inout_ struct tm *_Tm)
 
_Check_return_ _ACRTIMP __time64_t __cdecl _mkgmtime64 (_Inout_ struct tm *_Tm)
 
_Check_return_opt_ _ACRTIMP __time32_t __cdecl _mktime32 (_Inout_ struct tm *_Tm)
 
_Check_return_opt_ _ACRTIMP __time64_t __cdecl _mktime64 (_Inout_ struct tm *_Tm)
 
 _Success_ (return > 0) _Check_return_wat_ _ACRTIMP size_t __cdecl strftime(_Out_writes_z_(_SizeInBytes) char *_Buffer
 
_Check_return_wat_ _ACRTIMP errno_t __cdecl _strdate_s (_Out_writes_(_SizeInBytes) _When_(_SizeInBytes >=9, _Post_readable_size_(9)) char *_Buffer, _In_ size_t _SizeInBytes)
 
 __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0 (errno_t, _strdate_s, _Post_readable_size_(9) char, _Buffer) __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0(_Success_(return !=0) char *
 
 _Out_writes_z_ (9)
 
_Buffer _Check_return_wat_ _ACRTIMP errno_t __cdecl _strtime_s (_Out_writes_(_SizeInBytes) _When_(_SizeInBytes >=9, _Post_readable_size_(9)) char *_Buffer, _In_ size_t _SizeInBytes)
 
 __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0 (errno_t, _strtime_s, _Post_readable_size_(9) char, _Buffer) __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_0(char *
 
_Buffer _ACRTIMP __time32_t __cdecl _time32 (_Out_opt_ __time32_t *_Time)
 
_ACRTIMP __time64_t __cdecl _time64 (_Out_opt_ __time64_t *_Time)
 
_Check_return_ _CRT_INSECURE_DEPRECATE (ctime_s) static __inline char *__CRTDECL ctime(_In_ time_t const *const _Time)
 
static _Check_return_ __inline double __CRTDECL difftime (_In_ time_t const _Time1, _In_ time_t const _Time2)
 
_Check_return_ _CRT_INSECURE_DEPRECATE (gmtime_s) static __inline struct tm *__CRTDECL gmtime(_In_ time_t const *const _Time)
 
static __inline struct tm *__CRTDECL localtime (_In_ time_t const *const _Time)
 
static _Check_return_ __inline time_t __CRTDECL _mkgmtime (_Inout_ struct tm *const _Tm)
 
static _Check_return_opt_ __inline time_t __CRTDECL mktime (_Inout_ struct tm *const _Tm)
 
static __inline time_t __CRTDECL time (_Out_opt_ time_t *const _Time)
 
static _Check_return_ __inline int __CRTDECL timespec_get (_Out_ struct timespec *const _Ts, _In_ int const _Base)
 

Variables

_In_ size_t _SizeInBytes
 
_In_ size_t _In_ int _Index
 
_In_ __time32_t _Time2
 
_In_ size_t _In_z_ _Printf_format_string_ char const_Format
 
_In_ size_t _In_z_ _Printf_format_string_ char const _In_ struct tm const_Tm
 
_In_ size_t _MaxSize
 
_In_ size_t _In_z_ _Printf_format_string_ char const _In_ struct tm const _In_opt_ _locale_t _Locale
 
 __RETURN_POLICY_DST
 
 _ACRTIMP
 
 _strdate
 
 char
 
 _strtime
 
_In_ int _Base
 

Macro Definition Documentation

◆ _CRT_USE_CONFORMING_ANNEX_K_TIME

#define _CRT_USE_CONFORMING_ANNEX_K_TIME   0

Definition at line 22 of file time.h.

◆ _daylight

#define _daylight   (*__daylight())

Definition at line 70 of file time.h.

◆ _dstbias

#define _dstbias   (*__dstbias())

Definition at line 76 of file time.h.

◆ _INC_TIME

#define _INC_TIME

Definition at line 10 of file time.h.

◆ _timezone

#define _timezone   (*__timezone())

Definition at line 82 of file time.h.

◆ _tzname

#define _tzname   (__tzname())

Definition at line 88 of file time.h.

◆ CLOCKS_PER_SEC

#define CLOCKS_PER_SEC   ((clock_t)1000)

Definition at line 55 of file time.h.

◆ TIME_UTC

#define TIME_UTC   1

Definition at line 57 of file time.h.

Typedef Documentation

◆ clock_t

typedef long clock_t

Definition at line 30 of file time.h.

Function Documentation

◆ __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0() [1/2]

__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0 ( errno_t  ,
_strdate_s  ,
_Post_readable_size_(9) char  ,
_Buffer   
)
pure virtual

◆ __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0() [2/2]

__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_0 ( errno_t  ,
_strtime_s  ,
_Post_readable_size_(9) char  ,
_Buffer   
)

◆ __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1() [1/3]

__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1 ( errno_t  ,
_ctime32_s  ,
_Post_readable_size_(26) char  ,
_Buffer  ,
_In_ __time32_t const ,
_Time   
) const
pure virtual

◆ __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1() [2/3]

__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1 ( errno_t  ,
_ctime64_s  ,
_Post_readable_size_(26) char  ,
_Buffer  ,
_In_ __time64_t const ,
_Time   
)

◆ __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1() [3/3]

__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1 ( errno_t  ,
asctime_s  ,
_Post_readable_size_(26) char  ,
_Buffer  ,
_In_ struct tm const ,
_Time   
)

◆ _CRT_INSECURE_DEPRECATE() [1/2]

_Check_return_ _CRT_INSECURE_DEPRECATE ( ctime_s  ) const

Definition at line 500 of file time.h.

504 {
505 return _ctime64(_Time);
506 }
char *__cdecl _ctime64(__time64_t const *const time_t_value)
Definition: ctime.cpp:116
_In_ size_t _In_ const __time32_t * _Time
Definition: time.h:192

◆ _CRT_INSECURE_DEPRECATE() [2/2]

_Check_return_ _CRT_INSECURE_DEPRECATE ( gmtime_s  ) const

Definition at line 517 of file time.h.

520 {
521 return _gmtime64(_Time);
522 }
struct tm * _gmtime64(const __time64_t *ptime)
Definition: gmtime.c:104

◆ _CRT_INSECURE_DEPRECATE_GLOBALS() [1/4]

_Check_return_ _CRT_INSECURE_DEPRECATE_GLOBALS ( _get_daylight  )

◆ _CRT_INSECURE_DEPRECATE_GLOBALS() [2/4]

_Check_return_ _CRT_INSECURE_DEPRECATE_GLOBALS ( _get_dstbias  )

◆ _CRT_INSECURE_DEPRECATE_GLOBALS() [3/4]

_Check_return_ _CRT_INSECURE_DEPRECATE_GLOBALS ( _get_timezone  )

◆ _CRT_INSECURE_DEPRECATE_GLOBALS() [4/4]

_Check_return_ _Deref_ret_z_ _CRT_INSECURE_DEPRECATE_GLOBALS ( _get_tzname  )

◆ _ctime32_s()

_Check_return_wat_ _ACRTIMP errno_t __cdecl _ctime32_s ( _Out_writes_(_SizeInBytes) _Post_readable_size_(26) char _Buffer,
_In_range_(>=, 26) size_t  _SizeInBytes,
_In_ __time32_t const _Time 
)

◆ _ctime64_s()

◆ _difftime64()

_Check_return_ _ACRTIMP double __cdecl _difftime64 ( _In_ __time64_t  _Time1,
_In_ __time64_t  _Time2 
)

Referenced by difftime().

◆ _gmtime32_s()

_Check_return_wat_ _ACRTIMP errno_t __cdecl _gmtime32_s ( _Out_ struct tm _Tm,
_In_ __time32_t const _Time 
)

◆ _gmtime64_s()

◆ _localtime32_s()

_Check_return_wat_ _ACRTIMP errno_t __cdecl _localtime32_s ( _Out_ struct tm _Tm,
_In_ __time32_t const _Time 
)

◆ _localtime64_s()

◆ _mkgmtime()

static _Check_return_ __inline time_t __CRTDECL _mkgmtime ( _Inout_ struct tm *const  _Tm)
static

Definition at line 533 of file time.h.

536 {
537 return _mkgmtime64(_Tm);
538 }
_In_ size_t _In_z_ _Printf_format_string_ const char _In_ const struct tm * _Tm
Definition: time.h:148
_Check_return_ _ACRTIMP __time64_t __cdecl _mkgmtime64(_Inout_ struct tm *_Tm)

◆ _mkgmtime32()

◆ _mkgmtime64()

Referenced by _mkgmtime().

◆ _mktime32()

◆ _mktime64()

◆ _Out_writes_z_() [1/2]

_Out_writes_z_ ( )

◆ _Out_writes_z_() [2/2]

_Out_writes_z_ ( _SizeInBytes  )

◆ _strdate_s()

◆ _strtime_s()

◆ _Success_() [1/6]

_Success_ ( _Daylight !  = 0)

◆ _Success_() [2/6]

_Success_ ( _DaylightSavingsBias !  = 0)

◆ _Success_() [3/6]

_Success_ ( _TimeZone !  = 0)

◆ _Success_() [4/6]

_Success_ ( return = 0) const

◆ _Success_() [5/6]

_Success_ ( return  ,
 
)

◆ _Success_() [6/6]

_Success_ ( return  = = 0)

Deletes the virtual mapping and optionally gives back the page & dirty bit.

Parameters
Process- The process this address belongs to, or NULL if system address.
Address- The address to unmap.
WasDirty- Optional param receiving the dirty bit of the PTE.
Page- Optional param receiving the page number previously mapped to this address.
Returns
Whether there was actually a page mapped at the given address.

Definition at line 57 of file firmware.c.

207{
210
211 /* Check input parameters */
212 if (FirmwareType == NULL)
213 {
215 return FALSE;
216 }
217
218 /* Query firmware type */
220 &BootInfo,
221 sizeof(BootInfo),
222 0);
223 if (!NT_SUCCESS(Status))
224 {
226 return FALSE;
227 }
228
229 *FirmwareType = BootInfo.FirmwareType;
230 return TRUE;
231}
LONG NTSTATUS
Definition: precomp.h:26
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
Status
Definition: gdiplustypes.h:25
@ SystemBootEnvironmentInformation
Definition: extypes.h:307
DWORD BaseSetLastNTError(IN NTSTATUS Status)
Definition: reactos.cpp:167
NTSYSAPI NTSTATUS NTAPI NtQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInfoClass, OUT PVOID SystemInfoBuffer, IN ULONG SystemInfoBufferSize, OUT PULONG BytesReturned OPTIONAL)

◆ _time32()

◆ _time64()

◆ difftime()

static _Check_return_ __inline double __CRTDECL difftime ( _In_ time_t const  _Time1,
_In_ time_t const  _Time2 
)
static

Definition at line 509 of file time.h.

513 {
514 return _difftime64(_Time1, _Time2);
515 }
_Check_return_ _ACRTIMP double __cdecl _difftime64(_In_ __time64_t _Time1, _In_ __time64_t _Time2)
_In_ __time32_t _Time2
Definition: time.h:190

◆ localtime()

static __inline struct tm *__CRTDECL localtime ( _In_ time_t const *const  _Time)
static

Definition at line 525 of file time.h.

528 {
529 return _localtime64(_Time);
530 }
tm *__cdecl _localtime64(__time64_t const *const ptime)
Definition: localtime.cpp:208

◆ mktime()

Definition at line 541 of file time.h.

544 {
545 return _mktime64(_Tm);
546 }
_Check_return_opt_ _ACRTIMP __time64_t __cdecl _mktime64(_Inout_ struct tm *_Tm)

◆ time()

static __inline time_t __CRTDECL time ( _Out_opt_ time_t *const  _Time)
static

Definition at line 548 of file time.h.

551 {
552 return _time64(_Time);
553 }
_ACRTIMP __time64_t __cdecl _time64(_Out_opt_ __time64_t *_Time)

◆ timespec_get()

static _Check_return_ __inline int __CRTDECL timespec_get ( _Out_ struct timespec *const  _Ts,
_In_ int const  _Base 
)
static

Definition at line 556 of file time.h.

560 {
561 return _timespec64_get((struct _timespec64*)_Ts, _Base);
562 }
_In_ int _Base
Definition: time.h:330
int __cdecl _timespec64_get(_timespec64 *const ts, int const base)
Definition: time.cpp:53

Variable Documentation

◆ __RETURN_POLICY_DST

__RETURN_POLICY_DST

Definition at line 297 of file time.h.

◆ _ACRTIMP

_ACRTIMP

Definition at line 297 of file time.h.

◆ _Base

_In_ int _Base

Definition at line 329 of file time.h.

Referenced by timespec_get().

◆ _Format

Definition at line 271 of file time.h.

◆ _Index

_In_ size_t _In_ int _Index

Definition at line 110 of file time.h.

◆ _Locale

◆ _MaxSize

_In_ size_t _MaxSize

Definition at line 279 of file time.h.

◆ _SizeInBytes

_In_ size_t _SizeInBytes

Definition at line 109 of file time.h.

◆ _strdate

_strdate

Definition at line 297 of file time.h.

Referenced by _strdate_s(), and test_strdate().

◆ _strtime

_strtime

Definition at line 313 of file time.h.

Referenced by _strtime_s(), and test_strtime().

◆ _Time2

_In_ __time32_t _Time2

Definition at line 189 of file time.h.

Referenced by difftime().

◆ _Tm

◆ char

Definition at line 298 of file time.h.