Using system functions : $realtime and $time as arguments to format specification %t

In reply to Have_A_Doubt:

  1. Using a timescale of 10ns or 100ns is asking for trouble in my opinion.

  2. Specify a unit with your delays to remove any ambiguity, such as 10ns.

  3. Have a look at $timeformat(), and use %t with $realtime:

$timeformat [ ( units_number , precision_number , suffix_string , minimum_field_width ) ] ;