diff --git a/api/@ohos.systemTime.d.ts b/api/@ohos.systemTime.d.ts index 5b6ef1ea76f320874c69424a0e1e64ae9b5246fc..86240d09f5f939f8d601917f4e1e01edcbaeceee 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. @@ -106,4 +85,4 @@ declare namespace systemTime { function getTimezone(): Promise; } -export default systemTime; +export default systemTime; \ No newline at end of file