View Source NervesHubLink.Downloader.TimeoutCalculation (nerves_hub_link v2.5.2)
Pure functions for dealing with timeouts
Summary
Functions
Calculates the worst_case_timeout value based on content_length header and worst case network speed
Types
@type bits_per_second() :: non_neg_integer()
@type number_of_bytes() :: non_neg_integer()
Functions
@spec calculate_worst_case_timeout(number_of_bytes(), bits_per_second()) :: non_neg_integer()
Calculates the worst_case_timeout value based on content_length header and worst case network speed