diff src/twjit.c @ 8:95f6c8ce33b0

twjit: prep for rework of time delta handling
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 05 Jul 2024 21:57:51 +0000
parents 668b84c52094
children 355de6301404
line wrap: on
line diff
--- a/src/twjit.c	Fri Jul 05 21:38:21 2024 +0000
+++ b/src/twjit.c	Fri Jul 05 21:57:51 2024 +0000
@@ -37,6 +37,9 @@
 	twjit->ext_config = config;
 	twjit->ts_quantum = (uint32_t)quantum_ms * clock_khz;
 	twjit->quanta_per_sec = 1000 / quantum_ms;
+	twjit->ts_units_per_ms = clock_khz;
+	twjit->ts_units_per_sec = (uint32_t) clock_khz * 1000;
+	twjit->ns_to_ts_units = 1000000 / clock_khz;
 	twjit->state = TWJIT_STATE_EMPTY;
 	INIT_LLIST_HEAD(&twjit->sb[0].queue);
 	INIT_LLIST_HEAD(&twjit->sb[1].queue);