An open API service indexing awesome lists of open source software.

https://github.com/d-exclaimation/timing

In case, you miss setTimeout and setInterval while using Elixir
https://github.com/d-exclaimation/timing

concurrency elixir loops non-blocking timer

Last synced: about 1 year ago
JSON representation

In case, you miss setTimeout and setInterval while using Elixir

Awesome Lists containing this project

README

          

# Timing

Wrapping Library to perform common timing callbacks

## Usage

Haven't made this to work with mix at all

### Manual
1. Clone / Copy all the files in a directory in your project
2. Add to supervision tree
```elixir
def start(_type, _args) do
children = [
# Timing function seperate thread task capabilities
{Timing.Supervisor, name: Timing.Supervisor},
]
# ... your stuff here
end
```
3. Use the Timing to perform setTimeout and setInterval etc
```elixir
ref = Timing.timeout(2000, fn ->
# ... Some stuff here
end)

# ...

Timing.clear(ref) # Cancel callback
```