[pbs-devel] [PATCH proxmox v4 05/43] notify: add getter for notification timestamp

Lukas Wagner l.wagner at proxmox.com
Mon Apr 22 14:38:03 CEST 2024


Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
---
 proxmox-notify/src/lib.rs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/proxmox-notify/src/lib.rs b/proxmox-notify/src/lib.rs
index c69ac26..53f897a 100644
--- a/proxmox-notify/src/lib.rs
+++ b/proxmox-notify/src/lib.rs
@@ -261,6 +261,11 @@ impl Notification {
     pub fn id(&self) -> &Uuid {
         &self.id
     }
+
+    /// Return the notification's timestamp
+    pub fn timestamp(&self) -> i64 {
+        self.metadata.timestamp
+    }
 }
 
 /// Notification configuration
-- 
2.39.2





More information about the pbs-devel mailing list