ratecontroller: use durations instead of manually handling time

This commit is contained in:
Nils Andreas Svee committed 2022-11-10 13:54:26 +01:00
1 parent bb9d1ed4af
commit 5c0a6c304f
7 files changed
+84 -67

No files matched your search

-8
View File
@@ -16,14 +16,6 @@ impl Time {
}
}
pub fn get_seconds(&self) -> u64 {
self.time_s
}
pub fn get_nanoseconds(&self) -> u64 {
self.time_ns
}
pub fn get_time_since_midnight(&self) -> i64 {
(self.time_s as i64 % 86400 * 1000) + (self.time_ns as i64 / 1000000)
}