未验证 提交 67e7893c 编写于 作者: O openharmony_ci 提交者: Gitee

!11346 Add the return value of camera document interface getTimestamp

Merge pull request !11346 from 马利/master
......@@ -3758,12 +3758,12 @@ getTimestamp(callback: AsyncCallback<number\>): void
**示例:**
```js
metadataObject.getTimestamp((err) => {
metadataObject.getTimestamp((err,timestamp) => {
if (err) {
console.error(`Failed to get timestamp. ${err.message}`);
return;
}
console.log('Callback returned with timestamp getted.');
console.log('Callback returned with timestamp getted timestamp : ${timestamp}');
})
```
......@@ -3784,8 +3784,8 @@ getTimestamp(): Promise<number\>
**示例:**
```js
metadataObject.getTimestamp().then(() => {
console.log('Callback returned with timestamp getted.');
metadataObject.getTimestamp().then((timestamp) => {
console.log('Callback returned with timestamp getted timestamp : ${timestamp}');
})
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册