https://github.com/asmod4n/mruby-chrono
System and steady clocks for mruby
https://github.com/asmod4n/mruby-chrono
clock mruby
Last synced: 4 months ago
JSON representation
System and steady clocks for mruby
- Host: GitHub
- URL: https://github.com/asmod4n/mruby-chrono
- Owner: Asmod4n
- License: apache-2.0
- Created: 2016-05-10T15:40:21.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-04-14T18:30:47.000Z (over 1 year ago)
- Last Synced: 2025-01-11T18:47:27.785Z (about 1 year ago)
- Topics: clock, mruby
- Language: C
- Homepage:
- Size: 29.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mruby-chrono
Adds System and Steady clocks to mruby akin to std::chrono from c++11
Examples
========
```ruby
Chrono::Steady.now or Chrono.steady # returns a monotonic increasing timestamp, usefull for Benchmarking
```
```ruby
Chrono::System.now or Chrono.system # returns the current System Time
```
The return values are Ruby Floats.
You need a c++11 compatible c++ compiler.