Time is checked each minute
This commit is contained in:
		
							
								
								
									
										7
									
								
								test.lua
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								test.lua
									
									
									
									
									
								
							| @@ -30,7 +30,12 @@ tmr.alarm(0, 100, 1, function() | |||||||
|   else |   else | ||||||
|      tmr.stop(0) |      tmr.stop(0) | ||||||
|      print('IP: ',wifi.sta.getip()) |      print('IP: ',wifi.sta.getip()) | ||||||
|       |      -- Initaly set the time | ||||||
|      startTimeupdate() |      startTimeupdate() | ||||||
|  |       | ||||||
|  |      -- Update the time each minute | ||||||
|  |      tmr.alarm(1, 60000, 1, function() | ||||||
|  |         startTimeupdate() | ||||||
|  |      end) | ||||||
|   end |   end | ||||||
| end) | end) | ||||||
		Reference in New Issue
	
	Block a user