mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-24 04:27:59 +01:00
9 lines
230 B
Elixir
9 lines
230 B
Elixir
defmodule PhilomenaWeb.LayoutView do
|
|
use PhilomenaWeb, :view
|
|
|
|
def render_time(conn) do
|
|
(Time.diff(Time.utc_now(), conn.assigns[:start_time], :microsecond) / 1000.0)
|
|
|> Float.round(3)
|
|
|> Float.to_string()
|
|
end
|
|
end
|