mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 22:02:44 +00:00 
			
		
		
		
	LibCore: Make Core::Timer::create_single_shot() create a stopped timer
None of the code using this actually expected the timer to fire right away, but they would instead call start() on it once they were ready to accept a timer fire. Let's make the API behave the way its clients believed it did. :^)
This commit is contained in:
		
							parent
							
								
									f7116bba43
								
							
						
					
					
						commit
						add01b304b
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		|  | @ -39,6 +39,7 @@ public: | ||||||
|     { |     { | ||||||
|         auto timer = adopt(*new Timer(interval, move(timeout_handler), parent)); |         auto timer = adopt(*new Timer(interval, move(timeout_handler), parent)); | ||||||
|         timer->set_single_shot(true); |         timer->set_single_shot(true); | ||||||
|  |         timer->stop(); | ||||||
|         return timer; |         return timer; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling