Calculate after effects composition un-stretched time
The source time of a layer is found with the expression

thisComp.layer("some layer").sourceTime()


More about it can be found by reading the manual.