function __paradox_command_duration --description "Get the current command duration"
  if begin; set -q CMD_DURATION; and test $CMD_DURATION -ge 500; end
    # I do it in this somewhat roundabout way to preserve some floating point math
    set -l x (math "scale=2;$CMD_DURATION / 1000")
    set -l seconds (math "$x % 60")
    set -l timestamp (printf "%.02gs" $seconds)
    if test (math "$x >= 60") -eq 1
      set -l x (math "$x / 60")
      set -l minutes (math "$x % 60")
      set -l timestamp (printf "%dm" $minutes) $timestamp
      if test (math "$x >= 60") -eq 1
        set -l x (math "$x / 60")
        set -l hours (math "$x % 24")
        set -l timestamp (printf "%dh" $hours) $timestamp

        if test (math "$x >= 24") -eq 1
          set -l days (math "$x / 24")
          set -l timestamp (printf "%dd" $days) $timestamp

        end
      end
    end
    echo -s "[⌛️ $timestamp]"
  end
end

function __paradox_command_duration --description "Get the current command duration"
  if begin; set -q CMD_DURATION; and test $CMD_DURATION -ge 500; end
    # I do it in this somewhat roundabout way to preserve some floating point math
    set -l x (math --scale=2 "$CMD_DURATION / 1000")
    set -l seconds (math "$x % 60")
    set -l timestamp (printf "%.02gs" $seconds)
    if test $x -ge 60
      set -l x (math "$x / 60")
      set -l minutes (math "$x % 60")
      set -l timestamp (printf "%dm" $minutes) $timestamp
      if test $x -ge 60
        set -l x (math "$x / 60")
        set -l hours (math "$x % 24")
        set -l timestamp (printf "%dh" $hours) $timestamp

        if test $x -ge 60
          set -l days (math "$x / 24")
          set -l timestamp (printf "%dd" $days) $timestamp

        end
      end
    end
    echo -s "[$timestamp]"
  end
end

Remove emoji from timestamp and update math for 3
Remove emoji from timestamp and update math for 3

Remove the emoji from the timestamp; was causing word-wrap issues due to
character width problems

Update the math calls to be fish 3 compatible

paradox460/paradox-theme