forked from riker-rs/riker
-
Notifications
You must be signed in to change notification settings - Fork 1
Should we use Instant here? #8
Copy link
Copy link
Open
Description
/// Returns the system start date
pub fn start_date(&self) -> &DateTime<Utc> {
&self.proto.started_at
}
/// Returns the number of seconds since the system started
pub fn uptime(&self) -> u64 {
let now = Utc::now();
now.time()
.signed_duration_since(self.start_date().time())
.num_seconds() as u64
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels