| | |
| | | """ |
| | | import decimal |
| | | import random |
| | | import time |
| | | import time as t |
| | | import datetime |
| | | |
| | |
| | | return False |
| | | |
| | | |
| | | if __name__=="__main__": |
| | | d1 = decimal.Decimal("0.12") |
| | | d2 = decimal.Decimal("0.12") |
| | | if d1==d2: |
| | | print("123") |
| | | def run_time(): |
| | | def decorator(func): |
| | | def infunc(*args, **kwargs): |
| | | start = round(time.time() * 1000) |
| | | result = func(args, **kwargs) |
| | | print("执行时间", round(time.time() * 1000) - start) |
| | | return result |
| | | |
| | | return infunc |
| | | |
| | | return decorator |
| | | |
| | | |
| | | if __name__ == "__main__": |
| | | d1 = decimal.Decimal("0.12") |
| | | d2 = decimal.Decimal("0.12") |
| | | if d1 == d2: |
| | | print("123") |