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()
|
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 );
|
set_server( "pool.ntp.org", 123 );
|
||||||
return true;
|
init_ntp_server = true;
|
||||||
}();
|
}
|
||||||
(void)init_ntp_server;
|
|
||||||
|
|
||||||
udp_socket sock;
|
udp_socket sock;
|
||||||
sock.open();
|
sock.open();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue