fix ntp
This commit is contained in:
parent
6e7da6ca78
commit
75ec020227
1 changed files with 5 additions and 4 deletions
|
|
@ -19,11 +19,12 @@ namespace fc
|
|||
|
||||
fc::time_point ntp::get_time()
|
||||
{
|
||||
static bool init_ntp_server = [](){
|
||||
static bool init_ntp_server = false;
|
||||
if( !init_ntp_server )
|
||||
{
|
||||
set_server( "pool.ntp.org", 123 );
|
||||
return true;
|
||||
}();
|
||||
(void)init_ntp_server;
|
||||
init_ntp_server = true;
|
||||
}
|
||||
|
||||
udp_socket sock;
|
||||
sock.open();
|
||||
|
|
|
|||
Loading…
Reference in a new issue