def getmtime(x): sft = stat_float_times() stat_float_times(True) try: return _getmtime(x) finally: stat_float_times(sft)