From b94cab91a6741cea5a1750e4ff9c3bd3084bd648 Mon Sep 17 00:00:00 2001 From: liulinna Date: Wed, 16 Mar 2022 00:16:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=9A=E6=97=B6=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E8=8E=B7=E5=8F=96=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: guduhanyan --- api/@ohos.systemTime.d.ts | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/api/@ohos.systemTime.d.ts b/api/@ohos.systemTime.d.ts index 5b6ef1ea76..f7a4a2f71d 100755 --- a/api/@ohos.systemTime.d.ts +++ b/api/@ohos.systemTime.d.ts @@ -35,43 +35,22 @@ declare namespace systemTime { * Obtains the number of milliseconds that have elapsed since the Unix epoch. * @since 8 */ - function getCurrentTime(callback: AsyncCallback): void; - function getCurrentTime(): Promise; - - /** - * Obtains the number of nanoseconds that have elapsed since the Unix epoch. - * @since 8 - */ - function getCurrentTimeNs(callback: AsyncCallback): void; - function getCurrentTimeNs(): Promise; + function getCurrentTime(isNano?: boolean, callback: AsyncCallback): void; + function getCurrentTime(isNano?: boolean,): Promise; /** * Obtains the number of milliseconds elapsed since the system was booted, not including deep sleep time. * @since 8 */ - function getRealActiveTime(callback: AsyncCallback): void; - function getRealActiveTime(): Promise; - - /** - * Obtains the number of nanoseconds elapsed since the system was booted, not including deep sleep time. - * @since 8 - */ - function getRealActiveTimeNs(callback: AsyncCallback): void; - function getRealActiveTimeNs(): Promise; + function getRealActiveTime(isNano?: boolean, callback: AsyncCallback): void; + function getRealActiveTime(isNano?: boolean, ): Promise; /** * Obtains the number of milliseconds elapsed since the system was booted, including deep sleep time. * @since 8 */ - function getRealTime(callback: AsyncCallback): void; - function getRealTime(): Promise; - - /** - * Obtains the number of nanoseconds elapsed since the system was booted, including deep sleep time. - * @since 8 - */ - function getRealTimeNs(callback: AsyncCallback): void; - function getRealTimeNs(): Promise; + function getRealTime(isNano?: boolean, callback: AsyncCallback): void; + function getRealTime(isNano?: boolean, ): Promise; /** * Sets the system time. -- Gitee