+/// Returns the Duration remaining until the invoice expires.
+#[must_use]
+#[no_mangle]
+pub extern "C" fn Invoice_duration_until_expiry(this_arg: &crate::lightning_invoice::Invoice) -> u64 {
+ let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.duration_until_expiry();
+ ret.as_secs()
+}
+
+/// Returns the Duration remaining until the invoice expires given the current time.
+/// `time` is the timestamp as a duration since the Unix epoch.
+#[must_use]
+#[no_mangle]
+pub extern "C" fn Invoice_expiration_remaining_from_epoch(this_arg: &crate::lightning_invoice::Invoice, mut time: u64) -> u64 {
+ let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.expiration_remaining_from_epoch(core::time::Duration::from_secs(time));
+ ret.as_secs()
+}
+