update
This commit is contained in:
		
							
								
								
									
										11
									
								
								2024.01.16_GUAN_package_learning/common/example_of_timer.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								2024.01.16_GUAN_package_learning/common/example_of_timer.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| # 函数计时器 | ||||
| import guan | ||||
|  | ||||
| @guan.timer_decorator | ||||
| def my_function(): | ||||
|     import time | ||||
|     time.sleep(2) | ||||
|     print('Run finished!') | ||||
|  | ||||
| for _ in range(3): | ||||
|     my_function() | ||||
		Reference in New Issue
	
	Block a user