time_utils
Version, currently master branch1 version
- master branchlatestJul 30, 2022
github.com/data-niklas/time_utils
Timers and intervals
3 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
time_utils:
github: data-niklas/time_utils
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.33.0- License
- MIT
- Author
- Niklas Loeser
Dependencies
This version declares no dependencies.
README
time_utils
Timers and intervalls
Installation
-
Add the dependency to your
shard.yml:dependencies: time_utils: github: data-niklas/time_utils -
Run
shards install
Usage
require "time_utils"
Timer.run(5.seconds) do |timer|
puts "5 seconds"
end
timer2 = Timer.new(3.seconds) do |timer|
puts Time.utc - timer.at
end
timer2.run
Javascript like methods are exposed
setTimeout(1000) do |timer|
puts "1 second"
end
Recurring events:
Timer.run(5.seconds,true) do |timer|
puts "Every 5 seconds"
end
TODO: Write usage instructions here
Development
TODO: Write development instructions here
Contributing
- Fork it (https://github.com/data-niklas/time_utils/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Niklas Loeser - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Jul 30, 2022
- Crystal
0.33.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/data-niklas/time_utils
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 1