process.c: get_clk_tck fallback
* process.c (get_clk_tck): prefer CLK_TCK over older HZ, next to _SC_CLK_TCK. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9a952626f1
commit
e9f77725d2
17
process.c
17
process.c
@ -6882,20 +6882,15 @@ p_gid_switch(VALUE obj)
|
|||||||
static long
|
static long
|
||||||
get_clk_tck(void)
|
get_clk_tck(void)
|
||||||
{
|
{
|
||||||
long hertz =
|
|
||||||
#ifdef HAVE__SC_CLK_TCK
|
#ifdef HAVE__SC_CLK_TCK
|
||||||
sysconf(_SC_CLK_TCK);
|
return sysconf(_SC_CLK_TCK);
|
||||||
|
#elif defined CLK_TCK
|
||||||
|
return CLK_TCK;
|
||||||
|
#elif defined HZ
|
||||||
|
return HZ;
|
||||||
#else
|
#else
|
||||||
#ifndef HZ
|
return 60;
|
||||||
# ifdef CLK_TCK
|
|
||||||
# define HZ CLK_TCK
|
|
||||||
# else
|
|
||||||
# define HZ 60
|
|
||||||
#endif
|
#endif
|
||||||
#endif /* HZ */
|
|
||||||
HZ;
|
|
||||||
#endif
|
|
||||||
return hertz;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user