$ python3
Python 3.6.8 (default, May 2 2019, 20:40:44)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> import time
>>> time.time() - os.path.getmtime('./lock')
117.22999167442322
>>>
$ irb
irb(main):001:0> Time.now - File.stat('./lock').mtime
=> 149.379613735