ncpu.cr

Get number of cpus in Crystal

ncpu

This library returns number of cpus(cores).

Installation

Add this to your application's shard.yml:

dependencies:
  ncpu:
    github: tbrand/ncpu

Usage

require "ncpu"

To get number of cores, you do

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 taicsuzu - creator, maintainer
Repository

ncpu.cr

Owner
Statistic
  • 1
  • 0
  • 1
  • 0
  • 0
  • almost 7 years ago
  • April 29, 2017
License

MIT License

Links
Synced at

Fri, 03 May 2024 02:00:51 GMT

Languages