mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 03:20:05 +00:00 
			
		
		
		
	NTP polling
This commit is contained in:
		
							parent
							
								
									258466e02c
								
							
						
					
					
						commit
						dfb00b96df
					
				
					 3 changed files with 281 additions and 32 deletions
				
			
		|  | @ -1,6 +1,8 @@ | |||
| #pragma once | ||||
| 
 | ||||
| #include <chrono> | ||||
| #include <memory> | ||||
| #include <string> | ||||
| #include <string_view> | ||||
| 
 | ||||
| namespace scwx::network | ||||
|  | @ -21,8 +23,17 @@ public: | |||
|    NtpClient(NtpClient&&) noexcept; | ||||
|    NtpClient& operator=(NtpClient&&) noexcept; | ||||
| 
 | ||||
|    void Open(std::string_view host, std::string_view service); | ||||
|    void Poll(); | ||||
|    bool                                error(); | ||||
|    std::chrono::system_clock::duration time_offset() const; | ||||
| 
 | ||||
|    void        Start(); | ||||
|    void        Open(std::string_view host, std::string_view service); | ||||
|    void        OpenCurrentServer(); | ||||
|    void        Poll(); | ||||
|    std::string RotateServer(); | ||||
|    void        RunOnce(); | ||||
| 
 | ||||
|    static std::shared_ptr<NtpClient> Instance(); | ||||
| 
 | ||||
| private: | ||||
|    class Impl; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat