Writing task inside a function

In reply to santosh_1004:

Hi Santosh,

I guess due to simulator run.

I have used running the Synopsys Simulator and showing me the below result:

After 2 ns
After 5 ns
after function call
V C S S i m u l a t i o n R e p o r t
Time: 20 ns

Regards,
Arshia