diff --git a/api/@ohos.systemTime.d.ts b/api/@ohos.systemTime.d.ts index ef8856074dcafb4a0be901e19ee73cccc5492e30..594fc69e16feb9b179c70c1992b2aa498d0119c0 100755 --- a/api/@ohos.systemTime.d.ts +++ b/api/@ohos.systemTime.d.ts @@ -28,31 +28,24 @@ declare namespace systemTime { * @param time Target time stamp (ms) * @since 7 */ - function setTime(time : number, callback : AsyncCallback) : void; function setTime(time : number) : Promise; /** * Obtains the number of milliseconds that have elapsed since the Unix epoch. * @since 8 */ - function getCurrentTime(isNano: boolean, callback: AsyncCallback): void; - function getCurrentTime(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(isNano: boolean, callback: AsyncCallback): void; - function getRealActiveTime(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(isNano: boolean, callback: AsyncCallback): void; - function getRealTime(callback: AsyncCallback): void; function getRealTime(isNano?: boolean): Promise; /** @@ -61,14 +54,12 @@ declare namespace systemTime { * @param date The target date * @since 7 */ - function setDate(date: Date, callback: AsyncCallback): void; function setDate(date: Date): Promise; /** * Obtains the system date. * @since 8 */ - function getDate(callback: AsyncCallback): void; function getDate(): Promise; /** @@ -77,14 +68,12 @@ declare namespace systemTime { * @param timezone The system time zone * @since 7 */ - function setTimezone(timezone: string, callback: AsyncCallback): void; function setTimezone(timezone: string): Promise; /** * Obtains the system time zone. * @since 8 - */ - function getTimezone(callback: AsyncCallback): void; + */ function getTimezone(): Promise; }