That works fine in iex console:
iex(1)> spawn(fn -> :timer.tc(:timer, :sleep, [100]) |> elem(0) |> IO.puts end)
#PID<0.106.0>
100603
But when I put exactly the same line spawn(fn -> :timer.tc(:timer, :sleep, [100]) |> elem(0) |> IO.puts end)
inside .exs script - nothing happens, no output at all.
Why is that? How can I measure function's execute time in parallel?