Function esp_ward::connectivity::wifi::get_time

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

Retrieves the current time from the WorldTimeAPI.

§Arguments

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

§Returns

Returns a tuple (u8, u8, u8) representing the hours, minutes, and seconds if successful. Returns an error otherwise.