100+ results for '_SC_CLK_TCK'
Not the results you expected?
OSD_Chronometer.cxx (https://github.com/AsherBond/MondocosmOS.git) C++ · 272 lines
sysconf.h (http://microsea.googlecode.com/svn/trunk/) C Header · 143 lines
main_tang.cpp (https://github.com/rrnewton/PochoirMods.git) C++ · 245 lines
process_cpu_clocks.hpp (https://github.com/BlitzMaxModules/bah.mod.git) C++ Header · 331 lines
init.c (https://bitbucket.org/cdcs/leon-rtems.git) C · 88 lines
main.c (https://github.com/osdnk/sysopy.git) C · 266 lines
gmcpubar.c (https://github.com/vmj/gmbar.git) C · 360 lines
runtime.c (https://github.com/kfl/mosml.git) C · 326 lines
process_cpu_clocks.hpp (https://github.com/Tencent/mars.git) C++ Header · 354 lines
stopwatch.cpp (https://github.com/aptana/Jaxer.git) C++ · 265 lines
chrono.cpp (https://github.com/ftk/niceamx.git) C++ · 289 lines
Timer.cc (https://github.com/casacore/casacore.git) C++ · 345 lines
87 tms usage1; // current tms structure
88 real1 = times (&usage1);
89 return ((double) (real1 - real0)) / ((double) sysconf(_SC_CLK_TCK));
90 # endif
91 #else
128 times (&usage1);
129 return ((double) (usage1.tms_utime - usage0.tms_utime))
130 / ((double) sysconf(_SC_CLK_TCK));
131 # endif
132 #else
158 times (&usage1);
159 return ((double) (usage1.tms_stime - usage0.tms_stime))
160 / ((double) sysconf(_SC_CLK_TCK));
161 # endif
162 #else
index.c (https://github.com/peper/pizza.git) C · 189 lines
fpm_scoreboard.c (https://github.com/Doap/php-src.git) C · 328 lines
30 #ifdef HAVE_TIMES
31 #if (defined(HAVE_SYSCONF) && defined(_SC_CLK_TCK))
32 fpm_scoreboard_tick = sysconf(_SC_CLK_TCK);
33 #else /* _SC_CLK_TCK */
34 #ifdef HZ
35 fpm_scoreboard_tick = HZ;
37 fpm_scoreboard_tick = 100;
38 #endif /* HZ */
39 #endif /* _SC_CLK_TCK */
40 zlog(ZLOG_DEBUG, "got clock tick '%.0f'", fpm_scoreboard_tick);
41 #endif /* HAVE_TIMES */
hrt_utils.c (https://github.com/alibaba/AliSQL.git) C · 228 lines
csystem.c (https://github.com/mbrock/bigloo-llvm.git) C · 418 lines
ticks.c (https://gitlab.com/d.esterman/ba-phmf) C · 93 lines
Timer.cpp (https://github.com/sofian/drone.git) C++ · 121 lines
uttTime.cpp (https://github.com/ALTIBASE/altibase.git) C++ · 503 lines
142 m_microseconds_user +=
143 (SLong)( end_time_tick.tms_utime - start_time_tick.tms_utime )
144 * 1000000 / /*BUGBUG_NT*/(SLong)/*sysconf*/idlOS::sysconf/*BUGBUG_NT*/( _SC_CLK_TCK );
145 /* Compute system clock time */
146 m_microseconds_system +=
147 (SLong)( end_time_tick.tms_stime - start_time_tick.tms_stime )
148 * 1000000 / /*BUGBUG_NT*/(SLong)/*sysconf*/idlOS::sysconf/*BUGBUG_NT*/( _SC_CLK_TCK );
149 #else
150 m_microseconds_wallclock += (ULong)v_timeval.tv_sec * 1000000 + (ULong)v_timeval.tv_usec;
153 m_microseconds_user +=
154 (ULong)( end_time_tick.tms_utime - start_time_tick.tms_utime )
155 * 1000000 / /*BUGBUG_NT*/(ULong)/*sysconf*/idlOS::sysconf/*BUGBUG_NT*/( _SC_CLK_TCK );
156 /* Compute system clock time */
157 m_microseconds_system +=
config.h.in (https://github.com/timon/MacRuby.git) Autoconf · 234 lines
hrtimer.cpp (https://gitlab.com/cdeclare/intcrypt) C++ · 142 lines
tstopwatch.cpp (https://github.com/opentoonz/opentoonz.git) C++ · 402 lines
cpu_time.c (https://github.com/att14/ultraxomb.git) C · 137 lines
30 #if !defined (HAVE_GETRUSAGE) || !defined (HAVE_SYS_RESOURCE_H)
31 /* For times(), we _must_ know the number of clock ticks per second. */
32 # if defined (HAVE_TIMES) && (defined (HZ) || defined (_SC_CLK_TCK) || defined (CLK_TCK))
33 # ifdef HAVE_SYS_PARAM_H
34 # include <sys/param.h>
38 # endif
39 # ifndef HZ
40 # if defined _SC_CLK_TCK
41 # define HZ sysconf(_SC_CLK_TCK)
test_timer.cpp (https://github.com/homer6/import-geoip-data.git) C++ · 246 lines
os-util-test.cc (https://github.com/apache/kudu.git) C++ · 62 lines
43 ASSERT_OK(ParseStat(buf, &extracted_name, &stats));
44 ASSERT_EQ(name, extracted_name);
45 ASSERT_EQ(user_ticks * (1e9 / sysconf(_SC_CLK_TCK)), stats.user_ns);
46 ASSERT_EQ(kernel_ticks * (1e9 / sysconf(_SC_CLK_TCK)), stats.kernel_ns);
47 ASSERT_EQ(io_wait * (1e9 / sysconf(_SC_CLK_TCK)), stats.iowait_ns);
48 }
posixtime.h (https://github.com/liudidi/android_external_bash.git) C Header · 49 lines
platform_freebsd.cc (https://github.com/GunioRobot/node.git) C++ · 210 lines
unistd.h (https://github.com/josephzizys/plan-9.git) C Header · 168 lines
CpuFreqParser.cpp (https://gitlab.com/SkyDragon-OSP/platform_frameworks_base) C++ · 90 lines
sysconf.c (https://github.com/cpc26/abi_linux.git) C · 189 lines
system.h (https://github.com/GNA-SERVICES-INC/MoNGate.git) C Header · 105 lines
time.h (https://github.com/metricinc/illumos-gate.git) C Header · 87 lines
58 */
59 extern long sysconf(/* int name */);
60 #define _SC_CLK_TCK 3 /* clock ticks/sec */
61 /*
62 * POSIX.1 uses CLK_TCK to specify units used by times(3).
64 * we'll probably have to support it for a long time.
65 */
66 #define CLK_TCK (sysconf(_SC_CLK_TCK))
67 /* 881207 ANSI C draft uses CLOCKS_PER_SEC to specify units used by clock(3). */
68 #define CLOCKS_PER_SEC 1000000L
freq-step.c (https://github.com/bergwolf/linux.git) C · 263 lines
cputimer.cc (https://github.com/estrai/xapian.git) C++ · 93 lines
time.h (https://gitlab.com/infected_/linaro_aarch64-linux-android-5.3.x) C Header · 101 lines
hrtimer.cpp (https://github.com/weidai11/cryptopp.git) C++ · 174 lines
gauss.c (https://github.com/adgllorente/university.git) C · 156 lines
71 * (tiempo en milisegundos entre dos ticks del temporizador)
72 * Se calcula a partir del nº de intervalos que el temporizador cuenta cada segundo.
73 * Para saber este n� de intervalos hay que usar la llamada sysconf(_SC_CLK_TCK).
74 * El programa realiza esta llamada e inicializa la variable timer_resolution.
75 */
76 intervalos = sysconf(_SC_CLK_TCK);
77 timer_resolution = 1000000.0/intervalos;
ibcs2_unistd.h (https://bitbucket.org/killerpenguinassassins/open_distrib_devel.git) C Header · 76 lines
timer.cc (git://pkgs.fedoraproject.org/mingw-w64-tools) C++ · 132 lines
tst-mutex5.c (https://github.com/nitinkamble/glibc.git) C · 202 lines
times.c (https://git.sr.ht/~emersion/mrsh/) C · 41 lines
MemoryInfo.cc (https://bitbucket.org/MaxCam/anchordist.git) C++ · 129 lines
timer.c (https://bitbucket.org/bosp/benchmarks-parsec.git) C · 395 lines
SBB_util.cc (https://github.com/caymanson/financial_software_projects.git) C++ · 63 lines
OsHelperConstants.java (https://github.com/dstmath/HWFramework.git) Java · 91 lines
unistd.hpp (https://github.com/hpcdev/xylose.git) C++ Header · 113 lines
TStopwatch.cxx (git://pkgs.fedoraproject.org/root) C++ · 255 lines
LinuxProcessMonitor.cpp (https://bitbucket.org/arild/thesis) C++ · 426 lines
sysconf-consts.c (https://github.com/kayceesrk/multiMLton.git) C · 506 lines
timer.c (https://gitlab.com/jiapei100/ImageMagick) C · 477 lines
perf_writer.c (https://bitbucket.org/knarf/samba.git) C · 213 lines
getruntime.c (https://github.com/GunioRobot/MI424WR_GEN2_Rev_E-F.git) C · 116 lines
clock_getres.c (https://github.com/nitinkamble/x32-glibc.git) C · 118 lines
proc_stat_reader.cc (https://github.com/chromium/chromium.git) C++ · 142 lines
unix-system-wall-clock-ms.cc (https://github.com/nyuwireless-unipd/ns3-mmwave.git) C++ · 194 lines
98 //
99 NS_LOG_FUNCTION (this);
100 static int64_t ticksPerSecond = sysconf (_SC_CLK_TCK);
101 static double millisecondsPerTick = 1000. / ticksPerSecond;
104 // If sysconf () fails, we have no idea how to do the required conversion to ms.
105 //
106 NS_ABORT_MSG_IF (ticksPerSecond == -1, "SystemWallClockMsPrivate(): Cannot sysconf (_SC_CLK_TCK)");
108 struct tms endTimes;
os-util.cc (https://gitlab.com/s9perween/Impala) C++ · 114 lines
33 // Ensure that Impala compiles on earlier kernels. If the target kernel does not support
34 // _SC_CLK_TCK, sysconf(_SC_CLK_TCK) will return -1.
35 #ifndef _SC_CLK_TCK
36 #define _SC_CLK_TCK 2
37 #endif
39 static const int64_t TICKS_PER_SEC = sysconf(_SC_CLK_TCK);
41 // Offsets into the ../stat file array of per-thread statistics
posix-test.c (https://github.com/linkdd/slightx.git) C · 719 lines
timer.c (https://github.com/BlitzMaxModules/bah.mod.git) C · 415 lines
param.h (https://bitbucket.org/evzijst/gittest.git) C Header · 42 lines
CPUTime.hs (http://picorec.googlecode.com/svn/trunk/) Haskell · 182 lines
sys_clock_.c (https://github.com/avsm/src.git) C · 79 lines
time.h (https://github.com/cznic/cc.git) C Header · 97 lines
schema.go (https://github.com/lesovsky/pgcenter.git) Go · 166 lines
clock_getres.c (git://pkgs.fedoraproject.org/arm-gp2x-linux-glibc) C · 110 lines
test_mapper.c (https://github.com/NCAR/lrose-core.git) C · 240 lines
sysconf.c (https://github.com/pikpik/Shlib4MINIX3.git) C · 76 lines
t40f.c (https://gitlab.com/storedmirrors/minix) C · 193 lines
vul_timer.cxx (https://bitbucket.org/jtotz/vxl) C++ · 200 lines
Sysconf.java (https://github.com/finco/jnr-constants.git) Java · 143 lines
test-times.c (https://gitlab.com/Ntemis/wive-ng-mt) C · 105 lines
Timer.h (https://github.com/lolow/oboe-fix.git) C Header · 74 lines
times.rb (https://github.com/mingle/oauth2_provider.git) Ruby · 36 lines
test.c (https://repo.or.cz/barvinok.git) C · 254 lines
util.c (https://github.com/beekhof/libqb.git) C · 369 lines
timeu.c (https://bitbucket.org/dpgrote/pygist.git) C · 71 lines
time.c (https://bitbucket.org/gthummalapalle/minix-project2.git) C · 187 lines
times.c (https://gitlab.com/vascocosta/os) C · 184 lines
8-1.c (https://github.com/yourpalal/haiku.git) C · 236 lines
126 }
127 }
128 while ( ( cur_time - st_time ) < sysconf( _SC_CLK_TCK ) );
130 #if VERBOSE > 1
136 ( long ) ( parent_tms.tms_utime - ini_tms.tms_utime ),
137 ( long ) ( parent_tms.tms_stime - ini_tms.tms_stime ),
138 sysconf( _SC_CLK_TCK ) );
140 #endif
159 }
161 if ( child_tms.tms_utime + child_tms.tms_stime >= sysconf( _SC_CLK_TCK ) )
162 {
163 FAILED( "The tms struct was not reset during fork() operation" );
test-benchmark.c (https://gitlab.com/4144/gcc) C · 268 lines
Unistd.java (https://github.com/oracle/graal.git) Java · 131 lines
netkit-rusers-0.17-procps.patch (git://pkgs.fedoraproject.org/rusers) Patch · 101 lines
demo_sched_fifo.c (https://gitlab.com/Gentio/my-pdf) C · 102 lines
dsniff-2.4-sysconf_clocks.patch
(git://github.com/repoforge/rpms.git)
Patch · 27 lines
✨ Summary
This patch code updates the sshow.c
file to fix a clock issue, allowing it to work with older Linux kernel versions. It adds a check for the _SC_CLK_TCK
constant and uses its value if defined, ensuring compatibility with different system configurations. The changes are made in two locations within the sshow.c
file.
This patch code updates the sshow.c
file to fix a clock issue, allowing it to work with older Linux kernel versions. It adds a check for the _SC_CLK_TCK
constant and uses its value if defined, ensuring compatibility with different system configurations. The changes are made in two locations within the sshow.c
file.
HPL_timer_cputime.c (https://bitbucket.org/vbui/cs533-project) C · 163 lines
sysconf.c (https://bitbucket.org/pizzafactory/blackfin-toolchain.git) C · 383 lines
cpu.c (git://pkgs.fedoraproject.org/libgtop2) C · 136 lines
uptime.c (https://github.com/Shmuma/z.git) C · 120 lines
etime_.c (https://github.com/avsm/src.git) C · 160 lines
135 struct tms buffer;
137 /* NeXTStep seems to define _SC_CLK_TCK but not to have sysconf;
138 fixme: does using _POSIX_VERSION help? */
139 # if defined _SC_CLK_TCK && defined _POSIX_VERSION
140 if (! clk_tck) clk_tck = sysconf(_SC_CLK_TCK);
141 # elif defined CLOCKS_PER_SECOND
142 if (! clk_tck) clk_tck = CLOCKS_PER_SECOND;
gethrtime.c (https://github.com/Qthreads/qthreads.git) C · 60 lines
t_initialize.c (https://gitlab.com/martinsingh/SAM) C · 292 lines
Timer.cpp (https://github.com/paypal/hera.git) C++ · 310 lines
25 {
26 // Right here, it shows the problem with using '_' before identifier. It is reserved!
27 static long clk_tck = ::sysconf(_SC_CLK_TCK);
28 ASSERT( clk_tck > 0 );
35 {
36 // Right here, it shows the problem with using '_' before identifier. It is reserved!
37 static long clk_tck = ::sysconf(_SC_CLK_TCK);
38 ASSERT( clk_tck > 0 );
Time_Posix.ipp (https://github.com/Mysticial/y-cruncher.git) C++ Header · 122 lines
8-1.c (https://github.com/barajas/Intel-GLTP.git) C · 184 lines
99 if (cur_time == (clock_t) -1)
100 UNRESOLVED(errno, "times failed");
101 } while ((cur_time - st_time) < sysconf(_SC_CLK_TCK));
103 #if VERBOSE > 1
107 (long) (parent_tms.tms_utime - ini_tms.tms_utime),
108 (long) (parent_tms.tms_stime - ini_tms.tms_stime),
109 sysconf(_SC_CLK_TCK));
110 #endif
124 UNRESOLVED(errno, "times failed");
126 if ((child_tms.tms_utime + child_tms.tms_stime) >= sysconf(_SC_CLK_TCK))
127 FAILED("The tms struct was not reset during fork "
128 "operation");
config.h (git://github.com/funkaster/shinycocos.git) C Header · 186 lines
functions.c (https://gitlab.com/dtluna/Course) C · 223 lines
superlu_timer.c (https://github.com/jsilter/scipy.git) C · 72 lines
time_.h (https://github.com/josephzizys/plan-9.git) C Header · 95 lines
acct_view.c (https://gitlab.com/Gentio/my-pdf) C · 98 lines
fh_sysmon.c (https://github.com/csinitiative/fhce.git) C · 258 lines
31_sysconf_clocks.patch (https://gitlab.com/abchk1234/slackbuilds) Patch · 31 lines
12 clock_t delay;
13 int payload;
14 - long CLK_TCK= sysconf(_SC_CLK_TCK);
15 +#if defined(_SC_CLK_TCK)
16 + long CLK_TCK = sysconf(_SC_CLK_TCK);
17 +#endif
23 int skip;
24 range string_range;
25 - long CLK_TCK= sysconf(_SC_CLK_TCK);
26 +#if defined(_SC_CLK_TCK)
27 + long CLK_TCK = sysconf(_SC_CLK_TCK);
28 +#endif