]>
git.proxmox.com Git - mirror_edk2.git/blob - EmbeddedPkg/Include/Library/TimeBaseLib.h
3 * Copyright (c) 2016, Hisilicon Limited. All rights reserved.
4 * Copyright (c) 2016, Linaro Limited. All rights reserved.
6 * This program and the accompanying materials
7 * are licensed and made available under the terms and conditions of the BSD License
8 * which accompanies this distribution. The full text of the license may be found at
9 * http://opensource.org/licenses/bsd-license.php
11 * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef _TIME_BASE_LIB_H_
17 #define _TIME_BASE_LIB_H_
19 #include <Uefi/UefiBaseType.h>
21 // Define EPOCH (1970-JANUARY-01) in the Julian Date representation
22 #define EPOCH_JULIAN_DATE 2440588
25 #define SEC_PER_MIN ((UINTN) 60)
26 #define SEC_PER_HOUR ((UINTN) 3600)
27 #define SEC_PER_DAY ((UINTN) 86400)
28 #define SEC_PER_MONTH ((UINTN) 2,592,000)
29 #define SEC_PER_YEAR ((UINTN) 31,536,000)
50 Converts Epoch seconds (elapsed since 1970 JANUARY 01, 00:00:00 UTC) to EFI_TIME
55 IN UINTN EpochSeconds
,
60 Converts EFI_TIME to Epoch seconds (elapsed since 1970 JANUARY 01, 00:00:00 UTC)
69 returns Day of the week [0-6] 0=Sunday