Timescale info from simulator

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.