Skip to content

Commit

Permalink
Use System module for unit conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
José Valim committed Oct 3, 2018
1 parent a85791d commit c5e1af3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/ecto/log_entry_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ defmodule Ecto.LogEntryTest do
entry = %{entry | params: [1, 2, 3], query_time: 0, queue_time: 0}
assert to_binary(entry) == "QUERY OK db=0.0ms\ndone [1, 2, 3]"

diff = :erlang.convert_time_unit(1, :microsecond, :native)
diff = System.convert_time_unit(1, :microsecond, :native)
entry = %{entry | params: [1, 2, 3], query_time: 2100 * diff, queue_time: 100 * diff}
assert to_binary(entry) == "QUERY OK db=2.1ms queue=0.1ms\ndone [1, 2, 3]"

Expand Down

0 comments on commit c5e1af3

Please sign in to comment.