In Python, time.time()
gives you the elapsed time (also known as wall time).That includes CPU time inasmuch as that's a subset of wall time but you cannot extract CPU time from time.time()
itself.
For example, if your process runs for ten seconds but uses the CPU for only five of those seconds, the former includes the latter.