https://github.com/tbrand/ncpu.cr
Get number of cpus in Crystal
https://github.com/tbrand/ncpu.cr
crystal library
Last synced: 12 months ago
JSON representation
Get number of cpus in Crystal
- Host: GitHub
- URL: https://github.com/tbrand/ncpu.cr
- Owner: tbrand
- License: mit
- Created: 2017-04-29T09:30:13.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-29T13:15:34.000Z (almost 9 years ago)
- Last Synced: 2025-02-05T21:34:10.340Z (about 1 year ago)
- Topics: crystal, library
- Language: Crystal
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ncpu
This library returns number of cpus(cores).
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
ncpu:
github: tbrand/ncpu
```
## Usage
```crystal
require "ncpu"
```
To get number of cores, you do
```crystal
num_of_cpu_cores = Ncpu.get
```
## Contributing
1. Fork it ( https://github.com/tbrand/ncpu/fork )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request
## Contributors
- [tbrand](https://github.com/tbrand) taicsuzu - creator, maintainer