616bda409bf33611a00b53dc38e2838bb394c710
[staging/basesystem.git] / video_in_hal / otherservice / posix_based_os001_legacy_library / library / include / other_service / PosixBasedOS001TimeApi.h
1 /*
2  * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 // libraries for replacing PosixBasedOS001 to Linux
18 // PosixBasedOS001TimeApi.h
19
20 #ifndef OTHERSERVICE_POSIXBASEDOS001LEGACYLIBRARY_POSIXBASEDOS001_TIMEAPI_H_  // NOLINT(build/header_guard)
21 #define OTHERSERVICE_POSIXBASEDOS001LEGACYLIBRARY_POSIXBASEDOS001_TIMEAPI_H_  // NOLINT(build/header_guard)
22
23 #include <sys/types.h>
24
25 /*******************************************************************************/
26 /* define */
27
28 /*******************************************************************************/
29 /* typedef */
30
31 /*******************************************************************************/
32 /* struct */
33
34 /*******************************************************************************/
35 /* function */
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 /**
40  * @file PosixBasedOS001TimeApi.h
41  * @brief \~english This file provides delay API to delay for the specified time.
42  */
43
44 /** @addtogroup BaseSystem
45  *  @{
46  */
47 /** @addtogroup other_service
48  *  @ingroup BaseSystem
49  *  @{
50  */
51 /** @addtogroup posix_based_os001_legacy_library
52  *  @ingroup other_service
53  *  @{
54  */
55
56 /////////////////////////////////////////////////////////////////////////////////////
57 /// \ingroup delay
58 /// \~english @par Brief
59 ///     Delay for the specified time.
60 /// \~english @param [in] duration
61 ///     unsigned int - The number of milliseconds for which to suspend the calling thread from execution
62 /// \~english @retval EOK
63 /// \~english @par Prerequisite
64 ///     None
65 /// \~english @par Change of internal state
66 ///     None
67 /// \~english @par Conditions of processing failure
68 ///     None
69 /// \~english @par Detail
70 ///     If duration is more than 1000 milliseconds, return immediately.
71 /// \~english @par Classification
72 ///     Public
73 /// \~english @par Type
74 ///     Sync
75 /// \~english @see None
76 ////////////////////////////////////////////////////////////////////////////////////
77 unsigned int delay(unsigned int duration);  // NOLINT(readability/nolint)
78
79 /** @}*/  // end of posix_based_os001_legacy_library
80 /** @}*/  // end of other_service
81 /** @}*/  // end of BaseSystem
82 #ifdef __cplusplus
83 }
84 #endif
85
86 #endif  // OTHERSERVICE_POSIXBASEDOS001LEGACYLIBRARY_POSIXBASEDOS001_TIMEAPI_H_