• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 /**
16  * @defgroup clock
17  * @ingroup linux
18  */
19 #ifndef _LINUX_CLOCK_H
20 #define _LINUX_CLOCK_H
21 
22 #include "los_typedef.h"
23 
24 /**
25  * @ingroup clock
26  * @brief get the system time(ns)
27  *
28  * @par Description:
29  * This API is used to get the system time by read the value of system timer.
30  * @attention
31  * <ul>
32  * <li>system should init the system timer first.</li>
33  * </ul>
34  *
35  * @param None
36  *
37  * @retval unsigned long long   the system time(ns).
38  * @par Dependency:
39  * <ul><li>clock.h: the header file that contains the API declaration.</li></ul>
40  * @see None.
41  * @since Huawei LiteOS V200R003C00
42  */
43 extern unsigned long long sched_clock(void);
44 
45 #endif
46