 
   ## Helpers
 
+  defp time_unit_to_microseconds(number, :hour),
+    do: time_unit_to_microseconds(number * 60 * 60, :second)
+
+  defp time_unit_to_microseconds(number, :minute),
+    do: time_unit_to_microseconds(number * 60, :second)
+
+  defp time_unit_to_microseconds(number, unit),
+    do: System.convert_time_unit(number, unit, :microsecond)
+
   defp to_day_fraction(%{
          hour: hour,
          minute: minute,

      ~T[17:30:00.000000]
      iex> Time.add(~T[11:00:00.005], 2400)
      ~T[11:40:00.005000]
      iex> Time.add(~T[00:00:00], 86_399_999, :millisecond)
      ~T[23:59:59.999000]
      iex> Time.add(~T[17:10:05], 86400)
      ~T[17:10:05.000000]
      iex> Time.add(~T[23:00:00], -60)
      ~T[22:59:00.000000]

  """
  @doc since: "1.6.0"
  @spec add(Calendar.time(), integer, System.time_unit()) :: t
  def add(%{calendar: calendar} = time, number, unit \\ :second) when is_integer(number) do
    number = System.convert_time_unit(number, unit, :microsecond)
    total = time_to_microseconds(time) + number
    parts = Integer.mod(total, @parts_per_day)
    {hour, minute, second, microsecond} = calendar.time_from_day_fraction({parts, @parts_per_day})


  additional information about a date or time zone is ignored when calculating
  the difference.

  The `unit` controls the measurement unit for the returned value.
  The `unit` conversion always truncates lower units. For example, a
  difference of 90 seconds will be returned as 1 if `:minute` is given.

  If the first time value is earlier than the second, a negative number is
  returned. The answer can be returned in any `unit` available from
  `t:time_unit/0`. All units are treated as `Calendar.ISO` units.

  ## Examples

