当前位置: 首页 > news >正文

资溪做面包招聘的网站生物科技公司网站模板下载

资溪做面包招聘的网站,生物科技公司网站模板下载,公司官方网站建站,网站建设与管理维护设置系统时间 本模块用来设置、获取当前系统时间#xff0c;设置、获取当前系统日期和设置、获取当前系统时区。 说明#xff1a; 本模块首批接口从API version 7开始支持。后续版本的新增接口#xff0c;采用上角标单独标记接口的起始版本。 导入模块 import systemTime …设置系统时间 本模块用来设置、获取当前系统时间设置、获取当前系统日期和设置、获取当前系统时区。 说明 本模块首批接口从API version 7开始支持。后续版本的新增接口采用上角标单独标记接口的起始版本。 导入模块 import systemTime from ohos.systemTime;systemTime.setTime setTime(time : number, callback : AsyncCallback) : void 设置系统时间。 需要权限 ohos.permission.SET_TIME 系统能力 SystemCapability.Miscservices.Time 参数 参数名类型必填说明timenumber是目标时间戳ms。callbackAsyncCallback是回调函数可以在回调函数中处理接口返回值。 示例 // time对应的时间为2021-01-20 02:36:25 var time 1611081385000; systemTime.setTime(time, (error, data) {if (error) {console.error(failed to systemTime.setTime because JSON.stringify(error));return;}console.log(systemTime.setTime success data : JSON.stringify(data)); });systemTime.setTime setTime(time : number) : Promise 设置系统时间。 需要权限 ohos.permission.SET_TIME 系统能力 SystemCapability.MiscServices.Time 参数 参数名类型必填说明timenumber是目标时间戳ms。 返回值 类型说明Promise返回的异步回调函数。 示例 // time对应的时间为2021-01-20 02:36:25 var time 1611081385000; systemTime.setTime(time).then((data) {console.log(systemTime.setTime success data : JSON.stringify(data)); }).catch((error) {console.error(failed to systemTime.setTime because JSON.stringify(error)); });systemTime.getCurrentTime8 getCurrentTime(isNano?: boolean, callback: AsyncCallback): void 获取自 Unix 纪元以来经过的时间使用callback形式返回结果。 系统能力 SystemCapability.MiscServices.Time 参数 参数名类型必填说明isNanoboolean否如果是true返回纳秒数否则返回毫秒数。callbackAsyncCallback是回调函数返回自 Unix 纪元以来经过的时间。 示例 systemTime.getCurrentTime(true, (error, data) {if (error) {console.error(failed to systemTime.getCurrentTime because JSON.stringify(error));return;}console.log(systemTime.getCurrentTime success data : JSON.stringify(data)); });systemTime.getCurrentTime8 getCurrentTime(isNano?: boolean): Promise 获取自 Unix 纪元以来经过的时间使用Promise形式返回结果。 系统能力 SystemCapability.MiscServices.Time 参数 参数名类型必填说明isNanoboolean否如果是true返回纳秒数否则返回毫秒数。 返回值 类型说明Promise以Promise形式返回结果返回自 Unix 纪元以来经过的时间。 示例 systemTime.getCurrentTime().then((data) {console.log(systemTime.getCurrentTime success data : JSON.stringify(data)); }).catch((error) {console.error(failed to systemTime.getCurrentTime because JSON.stringify(error)); });systemTime.getRealActiveTime8 getRealActiveTime(isNano?: boolean, callback: AsyncCallback): void 获取自系统启动以来经过的时间不包括深度睡眠时间使用callback形式返回结果。 系统能力 SystemCapability.MiscServices.Time 参数 参数名类型必填说明isNanoboolean否如果是true返回纳秒数否则返回毫秒数。callbackAsyncCallback是回调函数返回自系统启动以来但不包括度睡眠时间经过的时间。 示例 systemTime.getRealActiveTime(true, (error, data) {if (error) {console.error(failed to systemTime.getRealActiveTimebecause JSON.stringify(error));return;}console.log(systemTime.getRealActiveTime success data : JSON.stringify(data)); });systemTime.getRealActiveTime8 getRealActiveTime(isNano?: boolean): Promise 获取自系统启动以来经过的时间不包括深度睡眠时间使用Promise形式返回结果。 系统能力 SystemCapability.MiscServices.Time 参数 参数名类型必填说明isNanoboolean否如果是true返回纳秒数否则返回毫秒数。 返回值 类型说明Promise以Promise形式返回结果返回自系统启动以来经过的时间但不包括深度睡眠时间。 示例 systemTime.getRealActiveTime().then((data) {console.log(systemTime.getRealActiveTime success data : JSON.stringify(data)); }).catch((error) {console.error(failed to systemTime.getRealActiveTime because JSON.stringify(error)); });systemTime.getRealTime8 getRealTime(callback: AsyncCallback): void 获取自系统启动以来经过的时间包括深度睡眠时间使用callback形式返回结果。 系统能力 SystemCapability.MiscServices.Time 参数 参数名类型必填说明isNanoboolean否如果是true返回纳秒数否则返回毫秒数。callbackAsyncCallback是回调函数返回自系统启动以来经过的时间包括深度睡眠时间。 示例 systemTime.getRealTime(true, (error, data) {if (error) {console.error(failed to systemTime.getRealTime because JSON.stringify(error));return;}console.log(systemTime.getRealTime success data: JSON.stringify(data)); });systemTime.getRealTime8 getRealTime(): Promise 获取自系统启动以来经过的时间包括深度睡眠时间使用Promise形式返回结果。 系统能力 SystemCapability.MiscServices.Time 参数 参数名类型必填说明isNanoboolean否如果是true返回纳秒数否则返回毫秒数。 返回值 类型说明Promise以Promise形式返回结果返回自系统启动以来经过的时间包括深度睡眠时间。 示例 systemTime.getRealTime().then((data) {console.log(systemTime.getRealTime success data: JSON.stringify(data)); }).catch((error) {console.error(failed to systemTime.getRealTime because JSON.stringify(error)); });systemTime.setDate setDate(date: Date, callback: AsyncCallback): void 设置系统日期使用callback形式返回结果。 需要权限 ohos.permission.SET_TIME 系统能力 SystemCapability.MiscServices.Time 参数 参数名类型必填说明dateDate是目标日期。callbackAsyncCallback是回调函数可以在回调函数中处理接口返回值。 示例 var data new Date(October 13, 2020 11:13:00); systemTime.setDate(data,(error, data) { if (error) { console.error(failed to systemTime.setDate because JSON.stringify(error)); return; } console.info(systemTime.setDate success data : JSON.stringify(data)); });systemTime.setDate setDate(date: Date): Promise 设置系统日期使用Promise形式返回结果。 需要权限 ohos.permission.SET_TIME 系统能力 SystemCapability.MiscServices.Time 参数 参数名类型必填说明dateDate是目标日期。 返回值 类型说明Promise返回的异步回调函数。 示例 var data new Date(October 13, 2020 11:13:00); systemTime.setDate(data).then((value) { console.log(systemTime.setDate success data : JSON.stringify(value)); }).catch((error) { console.error(failed to systemTime.setDate because: JSON.stringify(error)); });systemTime.getDate8 getDate(callback: AsyncCallback): void 获取当前系统日期使用callback形式返回结果。 系统能力 SystemCapability.MiscServices.Time 参数 参数名类型必填说明callbackAsyncCallback是回调函数返回当前系统日期。 示例 systemTime.getDate((error, data) {if (error) {console.error(failed to systemTime.getDate because JSON.stringify(error));return;}console.log(systemTime.getDate success data : JSON.stringify(data)); });systemTime.getDate8 getDate(): Promise 获取当前系统日期使用Promise形式返回结果。 系统能力 SystemCapability.MiscServices.Time 返回值 类型说明Promise以Promise形式返回结果返回当前系统日期。 示例 systemTime.getDate().then((data) {console.log(systemTime.getDate success data : JSON.stringify(data)); }).catch((error) {console.error(failed to systemTime.getDate because JSON.stringify(error)); });systemTime.setTimezone setTimezone(timezone: string, callback: AsyncCallback): void 设置系统时区。 需要权限 ohos.permission.SET_TIME_ZONE 系统能力 SystemCapability.MiscServices.Time 参数 参数名类型必填说明timezonestring是系统时区。callbackAsyncCallback是回调函数可以在回调函数中处理接口返回值。 示例 systemTime.setTimezone(Asia/Shanghai, (error, data) { if (error) { console.error(failed to systemTime.setTimezone because JSON.stringify(error)); return; } console.info(SystemTimePlugin systemTime.setTimezone success data : JSON.stringify(data)); });systemTime.setTimezone setTimezone(timezone: string): Promise 设置系统时区。 需要权限 ohos.permission.SET_TIME_ZONE 系统能力 SystemCapability.MiscServices.Time 参数 参数名类型必填说明timezonestring是系统时区。 返回值 类型说明Promise返回的异步回调函数。 示例 systemTime.setTimezone(Asia/Shanghai).then((data) { console.log(systemTime.setTimezone success data : JSON.stringify(data)); }).catch((error) { console.error(failed to systemTime.setTimezone because: JSON.stringify(error)); });systemTime.getTimezone8 getTimezone(callback: AsyncCallback): void 获取系统时区使用callback形式返回结果。 系统能力 SystemCapability.MiscServices.Time 参数 参数名类型必填说明callbackAsyncCallback是回调函数返回系统时区。 示例 systemTime.getTimezone((error, data) {if (error) {console.error(failed to systemTime.getTimezone because JSON.stringify(error));return;}console.log(systemTime.getTimezone success data : JSON.stringify(data)); });systemTime.getTimezone8 getTimezone(): Promise 获取系统时区使用Promise形式返回结果。 系统能力 SystemCapability.MiscServices.Time 返回值 类型说明Promise以Promise形式返回结果返回系统时区。 示例 systemTime.getTimezone().then((data) {console.log(systemTime.getTimezone success data : JSON.stringify(data)); }).catch((error) {console.error(failed to systemTime.getTimezone because JSON.stringify(error)); });
http://www.dnsts.com.cn/news/139609.html

相关文章:

  • 做网站 信科网络西宁网站建设开发
  • 做网站 需求wordpress文章列表排序
  • 网站的主要功能网站开发语言占有率
  • 建设网站的企业西安展厅设计公司
  • 网站建设技能描述加速游戏流畅的软件
  • 门户网站建设的背景和意义上海百度竞价托管
  • 做网站全过程折800网站源码
  • 网站整合discuzwordpress怎么改中文
  • 德国服务器网站seo和sem分别是什么
  • wordpress网站描述展示型型网站建设
  • 直流分公司四川建设部网站做网站版权所有怎么写
  • 网站前台的模块电商运营公司简介
  • 收费下载网站cmswordpress 评论可见
  • 网站建设服务费要不要折旧呢网站开发评分标准
  • 建设部网站工程资质做厨柜有招聘网站吗
  • 淘宝建设网站wordpress 挖矿脚本
  • 企业网站设计调查问卷网页访问自动跳转中
  • 沈阳哪家做网站最好自己建个网站怎么挣钱
  • 动易网站后台京东网上商城首页
  • 网站二级域名怎么设置wordpress th7好卡
  • 大兴黄村网站建设公司wordpress 关注插件
  • 17做网站西安建设工程信息网的地址
  • 想开发一个旧物交易网站应该怎么做网站标题和描述优化
  • 如何给一个公司做网站空间服务 网站被黑
  • 深圳拼团手机网站开发哈尔滨网站建设推广服务
  • 长春免费网站制作1级a做爰免费网站
  • 找外贸工作哪个网站好上海牛巨微seo
  • 标准型网站---北京网站建设网站关键词设置代码
  • 影响网站打开速度的因素电子商务静态网站建设心得
  • 传统媒体网站建设怎么在网站上做签到