cpp/thread/counting semaphore/try acquire until

Tries to atomically decrement the internal counter by if it is greater than ; otherwise blocks until it is greater than  and can successfully decrement the internal counter, or the  time point has been passed.

The programs is ill-formed if is.

Preconditions
meets the requirements.

Return value
if it decremented the internal counter, otherwise

Exceptions
May throw std or a timeout-related exception.