2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 // libraries for replacing PosixBasedOS001 to Linux
18 // PosixBasedOS001TimeApi.h
20 #ifndef OTHERSERVICE_POSIXBASEDOS001LEGACYLIBRARY_POSIXBASEDOS001_TIMEAPI_H_ // NOLINT(build/header_guard)
21 #define OTHERSERVICE_POSIXBASEDOS001LEGACYLIBRARY_POSIXBASEDOS001_TIMEAPI_H_ // NOLINT(build/header_guard)
23 #include <sys/types.h>
25 /*******************************************************************************/
28 /*******************************************************************************/
31 /*******************************************************************************/
34 /*******************************************************************************/
40 * @file PosixBasedOS001TimeApi.h
41 * @brief \~english This file provides delay API to delay for the specified time.
44 /** @addtogroup BaseSystem
47 /** @addtogroup other_service
51 /** @addtogroup posix_based_os001_legacy_library
52 * @ingroup other_service
56 /////////////////////////////////////////////////////////////////////////////////////
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
65 /// \~english @par Change of internal state
67 /// \~english @par Conditions of processing failure
69 /// \~english @par Detail
70 /// If duration is more than 1000 milliseconds, return immediately.
71 /// \~english @par Classification
73 /// \~english @par Type
75 /// \~english @see None
76 ////////////////////////////////////////////////////////////////////////////////////
77 unsigned int delay(unsigned int duration); // NOLINT(readability/nolint)
79 /** @}*/ // end of posix_based_os001_legacy_library
80 /** @}*/ // end of other_service
81 /** @}*/ // end of BaseSystem
86 #endif // OTHERSERVICE_POSIXBASEDOS001LEGACYLIBRARY_POSIXBASEDOS001_TIMEAPI_H_