Skip to content

Instantly share code, notes, and snippets.

#![warn(clippy::all, clippy::pedantic, clippy::nursery)]
use flume::bounded;
use std::sync::mpsc::sync_channel;
use std::thread;
const NUM_DIVISORS: i64 = 2000;
fn main() {
// create a channel to dequeue work
@Sporif
Sporif / evhz_higher_rate.patch
Created September 19, 2021 20:58
Allow evhz to detect refresh rates higher than 1000Hz (https://git.sr.ht/~iank/evhz)
diff --git a/evhz.c b/evhz.c
index 3b4d0cf..c7ba33d 100644
--- a/evhz.c
+++ b/evhz.c
@@ -118,13 +118,13 @@ int main(int argc, char *argv[]) {
unsigned long long time, timediff;
unsigned hz = 0;
- time = (unsigned long long)event.time.tv_sec * 1000ULL;
- time += (unsigned long long)event.time.tv_usec / 1000ULL;