diff --git a/api/@ohos.systemTime.d.ts b/api/@ohos.systemTime.d.ts index d69ec642af8bb6435ef764cdb3efa0374180dc65..9071438b0ea18674ecaa7efc934630dca7ccf933 100755 --- a/api/@ohos.systemTime.d.ts +++ b/api/@ohos.systemTime.d.ts @@ -32,6 +32,48 @@ declare namespace systemTime { 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(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; + + /** + * 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; + + /** + * 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; + /** * Sets the system time. * @permission ohos.permission.SET_TIME @@ -41,6 +83,13 @@ declare namespace systemTime { 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; + /** * Sets the system time zone. * @permission ohos.permission.SET_TIME_ZONE @@ -49,6 +98,13 @@ declare namespace systemTime { */ 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; } export default systemTime;