I'm a little confused about how [PITR](https://developers.cloudflare.com/durable-objects/api/sqlite-

I'm a little confused about how PITR works. The API says getCurrentBookmark() and getBookmarkForTime() return a Promise<string>, but the example right below it shows it being used without a promise:
let now = new Date();
// restore to 2 days ago
let bookmark = ctx.storage.getBookmarkForTime(now - 2);
ctx.storage.onNextSessionRestoreBookmark(bookmark);

Assuming it returns a promise, how can I guarantee the bookmark I get is accurate?
let bookmark = await getCurrentBookmark();
// stuff may happen here while it is awaiting
this.sql.exec(/* omitted */);
Was this page helpful?