Time::Beat

Internet Time extension for Time

Installation

gem install time-beat

Usage

irb(main):001> require 'time/beat'
=> true
irb(main):002> Time.now.to_beat.to_s
=> "@213.819"
irb(main):003> Time::Beat.now.to_s
=> "@213.900"
irb(main):004> Time::Beat.from_time(Time.now).to_s
=> "@214.086"
irb(main):005> Time::Beat.from_time(Time.now.utc).to_s
=> "@214.132"
irb(main):006> Time::Beat.new(BigDecimal(500.0)).to_time
=> 2026-05-27 12:00:00 UTC

Development

After checking out the repo, run bin/setup to install dependencies. Then, run bundle exec rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome at: https://codeberg.org/packrat386/time-beat

License

See LICENSE.txt, tl;dr it's MIT.