1 /* 2 * Copyright (C) 2022 Huawei Technologies Co., Ltd. 3 * Licensed under the Mulan PSL v2. 4 * You can use this software according to the terms and conditions of the Mulan PSL v2. 5 * You may obtain a copy of Mulan PSL v2 at: 6 * http://license.coscl.org.cn/MulanPSL2 7 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR 8 * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR 9 * PURPOSE. 10 * See the Mulan PSL v2 for more details. 11 */ 12 #ifndef LIBTIMER_TEE_TIME_SYS_H 13 #define LIBTIMER_TEE_TIME_SYS_H 14 #include <tee_time_defines.h> 15 16 uint64_t tee_read_time_stamp(void); 17 void get_sys_date_time(tee_date_time_kernel *time_date); 18 void gen_sys_date_time(uint32_t secs, tee_date_time_kernel *date_time); 19 struct tm *__localtime_r(const time_t *restrict, struct tm *restrict); 20 uint32_t adjust_sys_time(const struct tee_time_t *time); 21 int set_ta_timer_permission(const TEE_UUID *uuid, uint64_t permission); 22 void release_timer_event(const TEE_UUID *uuid); 23 int tee_timer_init(void); 24 #endif 25