Create a timed semaphore initially having the specified count.

Synopsis

Declared in <bslmt_timedsemaphore.h>

TimedSemaphore(
    int count,
    std::chrono::system_clock const& systemClock);

Description

Use the realtime system clock as the clock against which the absTime timeouts passed to the timedWait methods are interpreted (see {Supported Clock‐Types} in the component‐level documentation). This method does not return normally unless there are sufficient system resources to construct the object. The behavior is undefined unless 0 <= count.

Parameters

Name

Description

count

initial count of the semaphore

systemClock

tag selecting the system realtime clock

Created with MrDocs