X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=inc%2FFBaseRtTimer.h;h=a388603375f5024497878f2b523f897857378949;hb=07a771d39ebf4c7f26a04aeb3e06f9d7eb1c6dc2;hp=49801168da3c8a1395169b286a860da96926a047;hpb=45ef7710b6c338cf4df2981dfa363d3851dc95b0;p=platform%2Fframework%2Fnative%2Fappfw.git diff --git a/inc/FBaseRtTimer.h b/inc/FBaseRtTimer.h index 4980116..a388603 100644 --- a/inc/FBaseRtTimer.h +++ b/inc/FBaseRtTimer.h @@ -1,5 +1,4 @@ // -// Open Service Platform // Copyright (c) 2012 Samsung Electronics Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the License); @@ -39,8 +38,10 @@ namespace Tizen { namespace Base { namespace Runtime * @since 2.0 * * The %Timer class can activate the timer and notify the listeners. - * Once the target goes into sleep mode, Timer does not work properly because the main loop gets stopped. - * You can use Alarm on behalf of Timer for sleep mode. + * It supports the relative time and provides both repeatable and non-repeatable timers. + * Because %Timer is handled in an event-driven way, when the main loop gets blocked, even if the time is expired, the listener cannot get notified. + * Once the target goes into the sleep mode, %Timer does not work properly because the main loop gets stopped. + * You can use Alarm on behalf of the %Timer for the sleep mode. * For more information on the class features, see Timer. * The following example demonstrates how to use the %Timer class. * @@ -143,59 +144,60 @@ public: * @param[in] listener The event listener * @exception E_SUCCESS The method is successful. * @exception E_OUT_OF_MEMORY The memory is insufficient. - * @exception E_SYSTEM A system error has occurred. + * @exception E_SYSTEM A system error has occurred. */ result Construct(ITimerEventListener& listener); /** * Starts the timer. * - * @if OSPCOMPACT + * @if OSPCOMPAT * @brief [Compatibility] * @endif * * @since 2.0 * - * @if OSPCOMPACT - * @compatibility This method has compatibility issues with Tizen API versions @b prior @b to @b 2.1. @n - * For more information, see @ref CompTimerStartPage "here". + * @if OSPCOMPAT + * @compatibility This method has compatibility issues with Tizen API versions @b prior @b to @b 2.1. @n + * For more information, see @ref CompTimerStartPage "here". * @endif * - * @return An error code - * @param[in] timeout A timeout interval in milliseconds - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. - * @exception E_SYSTEM A system error has occurred. - * @remarks Once it has been started, it cannot be started again until it expires. @n - * You must cancel it if you want to re-start the timer. - * @see Cancel() + * @return An error code + * @param[in] timeout The timeout interval in milliseconds + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_INVALID_STATE The timer cannot start as it is in an invalid state. + * @exception E_SYSTEM A system error has occurred. + * @remarks Once the timer has been started, it cannot be started again until it has expired. + * @see Cancel() */ result Start(int timeout); /** - * @page CompTimerStartPage Compatibility for Start(int timeout) - * @section CompTimerStartPageIssueSection Issues - * Implementation of this method in Tizen API versions prior to 2.1 has the following issue: @n - * -# The method returns E_INVALID_ARG if timeout is equal to zero. - * - * @section CompTimerStartPageSolutionSection Resolutions - * The issue mentioned above is resolved in Tizen API version 2.1, and it is recommended to use Tizen API version 2.1 or above. - * -# In case of zero, Timer sets timeout to the best-effort minimum interval without returning E_INVALID_ARG. - */ + * @page CompTimerStartPage Compatibility for Start(int timeout) + * @section CompTimerStartPageIssueSection Issues + * Implementation of this method in Tizen API versions prior to 2.1 has the following issue: @n + * -# The method returns @c E_INVALID_ARG if timeout is equal to zero. + * + * @section CompTimerStartPageSolutionSection Resolutions + * The issue mentioned above is resolved in Tizen API version 2.1, and it is recommended to use Tizen API version 2.1 or above. + * -# In case of zero, %Timer sets the timeout to the best possible minimum interval without returning @c E_INVALID_ARG. + */ /** * Starts the timer. @n - * The timer is expired repeatedly until it is canceled. + * The timer expires repeatedly until it is cancelled. * * @since 2.0 * - * @return An error code - * @param[in] interval A timeout interval in milliseconds - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The specified input parameter is invalid. - * @exception E_SYSTEM A system error has occurred. - * @remarks To stop timer expiration or restart a timer, the timer must be canceled. - * @see Cancel() + * @return An error code + * @param[in] interval The timeout interval in milliseconds + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified input parameter is invalid. + * @exception E_INVALID_STATE The timer cannot start as it is in an invalid state. + * @exception E_SYSTEM A system error has occurred. + * @remarks To stop the timer expiration or restart the timer, the timer must be cancelled. + * @see Cancel() */ result StartAsRepeatable(int interval); @@ -205,9 +207,10 @@ public: * @since 2.0 * * @return An error code - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @remarks The timer cannot be canceled if it is not started. + * @remarks The started timer can be cancelled when it does not get expired. @n + * If the timer has already expired, this method also returns @c E_SUCCESS which causes the same effect as when cancelled normally. */ result Cancel(void);