aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/protocols/screencopy.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/protocols/screencopy.rs b/src/protocols/screencopy.rs
index 74c891d0..2dd9e316 100644
--- a/src/protocols/screencopy.rs
+++ b/src/protocols/screencopy.rs
@@ -1,7 +1,6 @@
use std::collections::HashMap;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
-use std::time::UNIX_EPOCH;
use smithay::backend::allocator::dmabuf::Dmabuf;
use smithay::backend::allocator::{Buffer, Fourcc};
@@ -22,6 +21,8 @@ use smithay::reexports::wayland_server::{
use smithay::utils::{Physical, Point, Rectangle, Size, Transform};
use smithay::wayland::{dmabuf, shm};
+use crate::utils::get_monotonic_time;
+
const VERSION: u32 = 3;
pub struct ScreencopyQueue {
@@ -470,7 +471,7 @@ impl Screencopy {
});
// Notify client about successful copy.
- let time = UNIX_EPOCH.elapsed().unwrap();
+ let time = get_monotonic_time();
let tv_sec_hi = (time.as_secs() >> 32) as u32;
let tv_sec_lo = (time.as_secs() & 0xFFFFFFFF) as u32;
let tv_nsec = time.subsec_nanos();