Function esp_ward::connectivity::wifi::get_timestamp

source ·
pub fn get_timestamp<'a, 's, MODE>(
    socket: Socket<'s, 'a, MODE>
) -> Result<u64, ()>
where MODE: WifiDeviceMode,
Expand description

Retrieves the current time as a UNIX timestamp from the WorldTimeAPI.

§Arguments

  • socket - The Socket to use for making the request to the WorldTimeAPI.

§Returns

Returns a timestamp representing time if successful. Returns an error otherwise.