Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tests / Nested_Upcall_Crash / Clock_Ticks.cpp
blob090ae91b3ec2f3eaa412bc01f2de3752e43b6901
1 /**
2 * @file Clock_Ticks.cpp
4 * @author Carlos O'Ryan <coryan@atdesk.com>
5 */
6 #include "Clock_Ticks.h"
8 long
9 Clock_Ticks::get_hz ()
11 #if defined(_SC_CLK_TCK)
12 long r = ACE_OS::sysconf(_SC_CLK_TCK);
13 if(r != -1)
14 return r;
15 #endif /* _SC_CLK_TCK */
17 #if defined(CLK_TCK)
18 return CLK_TCK;
19 #elif defined(HZ)
20 return HZ;
21 #else
22 return 100; // A good guess for most systems!
23 #endif /* CLK_TCK */
26 int
27 Clock_Ticks::get_usecs_per_tick ()
29 return 1000000 / get_hz ();