mirror of
				https://github.com/flynx/ImageGrid.git
				synced 2025-10-30 19:00:09 +00:00 
			
		
		
		
	added timer actions/events...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									ec988de624
								
							
						
					
					
						commit
						1949aa884f
					
				| @ -937,21 +937,40 @@ var TimersActions = actions.Actions({ | |||||||
| 
 | 
 | ||||||
| 	// Events...
 | 	// Events...
 | ||||||
| 	//
 | 	//
 | ||||||
|  | 	// XXX should these be "aligned" to real time???
 | ||||||
|  | 	// 		...i.e. everyHour is triggered on the XX:00:00 and not relative
 | ||||||
|  | 	// 		to start time?
 | ||||||
|  | 	// XXX should we macro these???
 | ||||||
| 	/*/ XXX would be nice to trigger these ONLY if there are handlers... | 	/*/ XXX would be nice to trigger these ONLY if there are handlers... | ||||||
| 	onSecond: ['- System/', | 	everySecond: ['- System/', | ||||||
| 		Event(function(){ |  | ||||||
| 		})], |  | ||||||
| 	onMinute: ['- System/', |  | ||||||
| 		Event(function(){ |  | ||||||
| 		})], |  | ||||||
| 	// XXX ???
 |  | ||||||
| 	on5Minutes: ['- System/', |  | ||||||
| 		Event(function(){ |  | ||||||
| 		})], |  | ||||||
| 	onHour: ['- System/', |  | ||||||
| 		Event(function(){ | 		Event(function(){ | ||||||
|  | 			// XXX
 | ||||||
| 		})], | 		})], | ||||||
| 	//*/
 | 	//*/
 | ||||||
|  | 	everyMinute: ['- System/', | ||||||
|  | 		Event(function(){ | ||||||
|  | 			// XXX
 | ||||||
|  | 		})], | ||||||
|  | 	every2Minutes: ['- System/', | ||||||
|  | 		Event(function(){ | ||||||
|  | 			// XXX
 | ||||||
|  | 		})], | ||||||
|  | 	every5Minutes: ['- System/', | ||||||
|  | 		Event(function(){ | ||||||
|  | 			// XXX
 | ||||||
|  | 		})], | ||||||
|  | 	every10Minutes: ['- System/', | ||||||
|  | 		Event(function(){ | ||||||
|  | 			// XXX
 | ||||||
|  | 		})], | ||||||
|  | 	every30Minutes: ['- System/', | ||||||
|  | 		Event(function(){ | ||||||
|  | 			// XXX
 | ||||||
|  | 		})], | ||||||
|  | 	everyHour: ['- System/', | ||||||
|  | 		Event(function(){ | ||||||
|  | 			// XXX
 | ||||||
|  | 		})], | ||||||
| }) | }) | ||||||
| 
 | 
 | ||||||
| var Timers =  | var Timers =  | ||||||
| @ -981,16 +1000,19 @@ module.Timers = ImageGridFeatures.Feature({ | |||||||
| 				this.persistentIntervals('stop')  | 				this.persistentIntervals('stop')  | ||||||
| 			}], | 			}], | ||||||
| 
 | 
 | ||||||
| 		/* XXX not sure about these... | 		// fixed timer actions...
 | ||||||
|  | 		// XXX not sure about these...
 | ||||||
| 		['start', | 		['start', | ||||||
| 			function(){ | 			function(){ | ||||||
|  | 				var m = 1000*60 | ||||||
| 				this | 				this | ||||||
| 					.setInterval('onSecond', 'onSecond', 1000) | 					.setInterval('everyMinute', 'everyMinute', m) | ||||||
| 					.setInterval('onMinute', 'onMinute', 1000*60) | 					.setInterval('every2Minutes', 'every2Minutes', m*2) | ||||||
| 					.setInterval('on5Minutes', 'onMinute', 1000*60*5) | 					.setInterval('every5Minutes', 'every5Minutes', m*5) | ||||||
| 					.setInterval('onHour', 'onHour', 1000*60*60) | 					.setInterval('every10Minutes', 'every10Minutes', m*10) | ||||||
|  | 					.setInterval('every30Minutes', 'every30Minutes', m*30) | ||||||
|  | 					.setInterval('everyHour', 'everyHour', m*60) | ||||||
| 			}], | 			}], | ||||||
| 		//*/
 |  | ||||||
| 	], | 	], | ||||||
| }) | }) | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user