I have a python module whose responsibility is to interpolate timestamp. I have a use case where I want to get process start time whenever a function in this module is called.
In Perl equivalent of this module, I used $^BASETIME, $^T to get the process start time. Is there a similar way in python also?
I referred to this question (How to retrieve the process start time (or uptime) in python). Is there any other way except using ps?
import time
def get_process_start_time():
return time.time()