NervesHubLinkCommon.Downloader.TimeoutCalculation (nerves_hub_link_common v0.2.0) View Source
Pure functions for dealing with timeouts
Link to this section Summary
Functions
Calculates the worst_case_timeout value based on content_length header and worst case network speed
Link to this section Types
Specs
bits_per_second() :: non_neg_integer()
Specs
number_of_bytes() :: non_neg_integer()
Link to this section Functions
Specs
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