waterlinkedsonar
C++ client library for the Water Linked Sonar 3D-15
Loading...
Searching...
No Matches
sntp.hpp
Go to the documentation of this file.
1
3
4#ifndef WATERLINKEDSONAR_NTP_SNTP_HPP
5#define WATERLINKEDSONAR_NTP_SNTP_HPP
6
7#include <chrono>
8#include <cstdint>
9#include <optional>
10#include <string>
11
12namespace waterlinked::sonar {
13
24std::optional<std::chrono::system_clock::time_point> sntp_query(
25 const std::string& server, std::chrono::milliseconds timeout,
26 std::uint16_t port = 123);
27
28} // namespace waterlinked::sonar
29
30#endif // WATERLINKEDSONAR_NTP_SNTP_HPP
std::optional< std::chrono::system_clock::time_point > sntp_query(const std::string &server, std::chrono::milliseconds timeout, std::uint16_t port=123)
Asks an NTP server for its time with one SNTP (RFC 4330) request, e.g.