How is a C function able to call a time consuming SV task?

how is a C function able to call a time consuming SV task?

Thanks in advance

In reply to unmay7:

Since the ā€œCā€ function calls a time consuming task (which I presume is exported) you will have to import the function as a import DPI-C task foo()

In reply to unmay7:

Look at the material in Systemverilog DPI | Verification Academy