# cpu-clock-ticks

> pure javascript implememtation to get `sysconf(_SC_CLK_TCK))` value

Latest version **1.0.2** (published 2015-04-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install cpu-clock-ticks
pnpm add cpu-clock-ticks
yarn add cpu-clock-ticks
bun add cpu-clock-ticks
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2015-04-29 |
| First published | 2015-04-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8.x |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | wyvernnot |
| Maintainers | wyvernnot |
| Keywords | CPU, clock, ticks, _SC_CLK_TCK |

## Links

- npm: https://www.npmjs.com/package/cpu-clock-ticks
- Repository: https://github.com/wyvernnot/cpu-clock-ticks
- Issues: https://github.com/wyvernnot/cpu-clock-ticks/issues
- npm.io page: https://npm.io/package/cpu-clock-ticks

## Recent versions

- 1.0.2 (latest) — 2015-04-29
- 1.0.1 — 2015-04-28
- 1.0.0 — 2015-04-28

## README

# cpu-clock-ticks
--------------------------

pure javascript implementation to get `sysconf(_SC_CLK_TCK))` value

[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Linux Build][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]

## Sample Code

```javascript
var cct=require('cpu-clock-ticks');
console.log('Clock ticks for CPU is %d HZ',cct());
```

Normally it will be 100HZ.

## Inspiration
[node-usage](https://github.com/arunoda/node-usage)

## Limitation
Works only on Linux ( tested on `Ubuntu` and `CentOS` ), because the code assumes `/proc/{pid}/stat` exists.

## Validation
Execute following command will return `_SC_CLK_TCK`
```shell
getconf CLK_TCK
```

## License
MIT

[npm-image]: https://img.shields.io/npm/v/cpu-clock-ticks.svg
[npm-url]: https://npmjs.org/package/cpu-clock-ticks
[downloads-url]: https://npmjs.org/package/cpu-clock-ticks
[downloads-image]: https://img.shields.io/npm/dm/cpu-clock-ticks.svg
[travis-image]: https://travis-ci.org/wyvernnot/cpu-clock-ticks.svg
[travis-url]: https://travis-ci.org/wyvernnot/cpu-clock-ticks
[coveralls-image]: https://img.shields.io/coveralls/wyvernnot/cpu-clock-ticks/master.svg
[coveralls-url]: https://coveralls.io/r/wyvernnot/cpu-clock-ticks?branch=master

---
_Source: https://npm.io/package/cpu-clock-ticks · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
