Sha256: 390b2c0e95ea731d1c0eae36f3c00f42f0253c58c4fec806e09ce006278b6e9a
Contents?: true
Size: 546 Bytes
Versions: 3
Compression:
Stored size: 546 Bytes
Contents
#include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <sys/param.h> #include <sys/pstat.h> #include <machine/inline.h> long long cpucycles_hppapstat(void) { register long long result; _MFCTL(16,result); return result; } long long cpucycles_hppapstat_persecond(void) { struct pst_processor pst; union pstun pu; double result; pu.pst_processor = &pst; if (pstat(PSTAT_PROCESSOR,pu,sizeof(pst),1,0) < 0) return 0; result = pst.psp_iticksperclktick; result *= (double) sysconf(_SC_CLK_TCK); return result; }
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ruby_nacl-0.1.2 | ext/ruby_nacl/NaCl/cpucycles/hppapstat.c |
ruby_nacl-0.1.1 | ext/ruby_nacl/NaCl/cpucycles/hppapstat.c |
ruby_nacl-0.1.0 | ext/ruby_nacl/NaCl/cpucycles/hppapstat.c |