diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b111aa2..db0c4529 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: # Remember to update me in package-set.yml as well env: vessel_version: "v0.7.0" - moc_version: "0.13.4" + moc_version: "0.13.5" jobs: tests: diff --git a/.github/workflows/package-set.yml b/.github/workflows/package-set.yml index 5c550722..e704fb42 100644 --- a/.github/workflows/package-set.yml +++ b/.github/workflows/package-set.yml @@ -8,7 +8,7 @@ on: env: vessel_version: "v0.7.0" - moc_version: "0.13.4" + moc_version: "0.13.5" jobs: verify: diff --git a/CHANGELOG.md b/CHANGELOG.md index 7afbbec9..af3099d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ * Added `Text.fromArray` and `Text.fromVarArray` functions (#674). +* Added `replyDeadline` to `ExperimentalInternetComputer` (#677). + ## 0.13.4 * Breaking change (minor): `Float.format(#hex)` is no longer supported. diff --git a/mops.toml b/mops.toml index 70df5e7d..a2547fd1 100644 --- a/mops.toml +++ b/mops.toml @@ -1,6 +1,6 @@ [package] name = "base" -version = "0.13.4" +version = "0.13.5" description = "The Motoko base library" repository = "https://github.com/dfinity/motoko-base" keywords = [ "base" ] @@ -10,5 +10,5 @@ license = "Apache-2.0" matchers = "https://github.com/kritzcreek/motoko-matchers#v1.3.0@3dac8a071b69e4e651b25a7d9683fe831eb7cffd" [toolchain] -moc = "0.13.4" +moc = "0.13.5" wasmtime = "17.0.0" diff --git a/src/ExperimentalInternetComputer.mo b/src/ExperimentalInternetComputer.mo index d7e158be..3a3d4c2d 100644 --- a/src/ExperimentalInternetComputer.mo +++ b/src/ExperimentalInternetComputer.mo @@ -82,4 +82,10 @@ module { /// ``` public let performanceCounter : (counter : Nat32) -> (value: Nat64) = Prim.performanceCounter; + /// Returns the time (in nanoseconds from the epoch start) by when the update message should + /// reply to the best effort message so that it can be received by the requesting canister. + /// Queries and non-best-effort update messages return zero. + /// + public func replyDeadline() : Nat = Prim.nat64ToNat(Prim.replyDeadline()); + }