Timescale info from simulator

I am using vpi_TimeUnit and vpi_Timeprecision to retrieve timescale info from simulator. But both returns same value.
timecale 1ns/100ps
Here vpi_TimePrecision returns -10 (according to PLI handbook this is correct). vpi_TimeUnit gives wrong value.
Is there any routine available to get time unit?

In reply to Anjali_Ekkattiri:

I assume you mean you are using vpi_get(vpiTimeUnit, <object> ). What value are you getting versus what you are expecting? And what object did you pass as an argument?

In reply to dave_59:

yes, I am using vpi_get(vpiTimeUnit,null) here I am expecting time unit from the timescale eg: timescale 1ns/100ps
my expected value is 1ns.
According to my code I want to get smallest timeprecision from the DUT.
vpi_get(vpiTimePrecision , null) returns the exact value -10
but vpiTimeUnit also gives -10.

In reply to Anjali_Ekkattiri:

The LRM says in several places:

Passing a NULL handle to vpi_get() with properties vpiTimePrecision or vpiTimeUnit shall return the smallest time precision of all modules in the instantiated design.

It is meaningless to ask for the timescale of the null instance since timescales only apply to instances.