You can use os.path.getmtime()
to get the timestamp of the system boot time and then subtract it from the current timestamp to get the time elapsed since boot in seconds. You can then multiply it by 1000 to get the time elapsed in milliseconds.
Here's the code to get system boot time in milliseconds:
main.py284 chars11 lines
gistlibby LogSnag