fix audio no sound, add missing VideoFrame timestamp

move get_time to hbb_common

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2022-09-11 21:46:53 +08:00
parent 302a43d68c
commit 42d17f9d2b
8 changed files with 30 additions and 26 deletions

View File

@@ -228,6 +228,14 @@ pub fn get_uuid() -> Vec<u8> {
Config::get_key_pair().1
}
#[inline]
pub fn get_time() -> i64 {
std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.map(|d| d.as_millis())
.unwrap_or(0) as _
}
#[cfg(test)]
mod tests {
use super::*;