opnsense-ports/sysutils/wmbluecpu/files/patch-timing.c
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

26 lines
631 B
C

--- timing.c.orig Sat Mar 29 21:26:11 2003
+++ timing.c Sat Mar 29 23:23:09 2003
@@ -24,7 +24,7 @@
#include "draw.h"
#include "options.h"
-#include "cpu_linux.h"
+#include "cpu_freebsd.h"
void handle_timer(int sig)
{
@@ -39,11 +39,12 @@
{
struct itimerval itv;
+ cpu_init();
signal(SIGALRM, handle_timer);
itv.it_value.tv_sec = 2;
itv.it_value.tv_usec = 0;
- itv.it_interval.tv_sec = 0;
- itv.it_interval.tv_usec = opt_timer_miliseconds * 1000;
+ itv.it_interval.tv_sec = opt_timer_miliseconds / 1000;
+ itv.it_interval.tv_usec = (opt_timer_miliseconds % 1000) * 1000;
setitimer(ITIMER_REAL, &itv, NULL);
}