Time precision based question

My expected output should be 100.07ns but actual output is 100. Why ???

module top;
  timeunit 1ns; timeprecision 100ps;
  initial begin
    #10.007;
    $timeformat(-10,4,"ns");
    $display("%t",$realtime);
  end
endmodule

In reply to amir_sharfu:

You specified a time precision of 100ps. That means 10.007ns gets rounded down to 10.0ns. Had you written 10.07ns, it would have been rounded up to 10.1ns, and the display would have been 101.0000ns.

In reply to amir_sharfu:

Adding to Dave’s comment, change the time precsion to 1ps if you want to see 10.007 maintained
for the rest of simulation

In reply to amir_sharfu:

1ns/100ps : degree of accuracy=1 (1ns/100ps=10^1)

Refer this link → https://letuslearnsv.com/2023/01/19/timescale-simulation-time-units/