From 4d33603f39c68c4f0e0308b0b8307b2b220be1a0 Mon Sep 17 00:00:00 2001 From: tequ Date: Tue, 23 Sep 2025 16:17:15 +0900 Subject: [PATCH] ledger_last_time --- src/ripple/app/hook/impl/HookAPI.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ripple/app/hook/impl/HookAPI.cpp b/src/ripple/app/hook/impl/HookAPI.cpp index 84af7b3ca..7e735732e 100644 --- a/src/ripple/app/hook/impl/HookAPI.cpp +++ b/src/ripple/app/hook/impl/HookAPI.cpp @@ -585,6 +585,15 @@ HookAPI::ledger_last_hash() const return hookCtx.applyCtx.view().info().parentHash; } +uint64_t +HookAPI::ledger_last_time() const +{ + return hookCtx.applyCtx.view() + .info() + .parentCloseTime.time_since_epoch() + .count(); +} + Expected HookAPI::ledger_nonce() const {