In reply to mukul1996:
Since your time scale is 10ns, $realtime returns 1.6 and $time has to return an integer, so that gets rounded up to 2. Your timescale is 1ns, so the %t format will scale the value to represent nanoseconds, it multiplies the returned value by 10. Try changing %t to %g to see what is going on.