Display time using $Display in System verilog/UVM

In reply to samir singh:

The $timeformat systemtask can be used for this. More details in the LRM.
E.g.


initial
//shall print %t with scaled in ns (-9), with 2 precision digits, and would print the " ns" string
  $timeformat(-9, 2, " ns", 20);