Skip to content

Commit

Permalink
Always return a UInt64 type (even when returning 0)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpamnany committed Nov 8, 2024
1 parent 1b58cf6 commit da5e302
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/experimental.jl
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ See [`Base.Experimental.task_metrics`](@ref).
function task_wall_time_ns(t::Task=current_task())
t.metrics_enabled || return nothing
start_at = t.first_enqueued_at
start_at == 0 && return 0
start_at == 0 && return UInt64(0)
end_at = t.finished_at
end_at == 0 && return time_ns() - start_at
return end_at - start_at
Expand Down

0 comments on commit da5e302

Please sign in to comment.