Time unit is wrong in the UVM test main_phase

Hello, in my UVM test, the time unit is 1000 fold shorter than the expected one, so I do a few test below:


$display("time 0 %0t", $time);
#10;
$display("time 1 %0t", $time);
#10us;
$display("time 2 %0t", $time);
#1ms;
$display("time 3 %0t", $time);

And the output is:
time 0 0.220 ns
time 1 0.230 ns
time 2 10.230 ns
time 3 1010.230 ns

And I call the $timeformat(-9, 3, " ns", 12) in testbench top.

It seems that the time unit is 1000 times shorter than the expected one.
But why?

In reply to whwjez:
and I add “-diag timescale” option in compilation, the “tb” and “uvm_pkg” time unit is “1ns”, time precision is “1ps”