You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
time_limit is almost exactly like timeout but it doesn't throw an exception. It returns a bool. Timeouts in libhal are categorized as error situations. Such functions should never throw an exception unless a critical time limit has been exceeded. With time_limit the assumption is that the limit being exceeded is apart of the logic and correct behavior. The callable's signature should look like and be compatible with:
using time_limit = bool(void);
Unlike timeout this doesn't need to be a concept. At least not util it is clear that such a construct is in demand. This should be a simple functor or lambda that uses a steady clock in order to determine if a time has expired.
There should also be a delay() api that delays until the remaining time has elapsed.
The text was updated successfully, but these errors were encountered:
time_limit
is almost exactly liketimeout
but it doesn't throw an exception. It returns a bool. Timeouts in libhal are categorized as error situations. Such functions should never throw an exception unless a critical time limit has been exceeded. Withtime_limit
the assumption is that the limit being exceeded is apart of the logic and correct behavior. The callable's signature should look like and be compatible with:Unlike timeout this doesn't need to be a concept. At least not util it is clear that such a construct is in demand. This should be a simple functor or lambda that uses a steady clock in order to determine if a time has expired.
There should also be a
delay()
api that delays until the remaining time has elapsed.The text was updated successfully, but these errors were encountered: