[PATCH]:erts/emulator/beam/erl_time_sup.c

Vladimir Sekissov <>
Sat Jan 4 18:45:13 CET 2003


Good day,

This simple patch is intended to new Linux kernels (2.5.*) where

sysconf(_SC_CLK_TCK) == 1024

but some code in `erts/emulator/beam/erl_time_sup.c' were written with
assumption that this value is far less than 1000(it is traditionally
100 on most systems).

Best regards,
Vladimir Sekissov

--- erts/emulator/beam/erl_time_sup.c.orig	2003-01-04 22:30:47.000000000 +0500
+++ erts/emulator/beam/erl_time_sup.c	2003-01-04 22:27:00.000000000 +0500
@@ -219,7 +219,7 @@
     Milli act_correction; /* long showed to be too small */
     Milli max_adjust;
 
-#define TICK_MS (1000 / SYS_CLK_TCK)
+#define TICK_MS (1000.0 / SYS_CLK_TCK)
 
     current_ct = KERNEL_TICKS();
     sys_gettimeofday(&current_tv);



More information about the erlang-questions mailing list