Calling function in class

In reply to timag:

You could use a static variable in the class;


class A;
static bit first;

function my_func;
  if(first==0) begin
    $display("Time on first call is %d",$time);
    first = 1;
  end
endfunction

endclass;