this repo has no description
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add simulate_work/1

garrison a2b7ff67 1b39f9df

+10
+10
lib/trinity/sim.ex
··· 1 1 defmodule Trinity.Sim do 2 + alias Trinity.SimProcess 2 3 alias Trinity.Scheduler.Simulation 3 4 import Trinity.Scheduler, only: [simulation_key: 0] 4 5 ··· 17 18 nil -> false 18 19 _sim -> true 19 20 end 21 + end 22 + 23 + @spec simulate_work([non_neg_integer]) :: :ok 24 + def simulate_work(choices) do 25 + case get_sim() do 26 + nil -> :noop 27 + _sim -> SimProcess.sleep(Enum.random(choices)) 28 + end 29 + :ok 20 30 end 21 31 end