[#BloombergLP-bslmt-TimedSemaphore-tryWait]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/TimedSemaphore.adoc[TimedSemaphore]::tryWait
:relfileprefix: ../../../
:mrdocs:

If the count of this timed semaphore is positive, atomically decrement the count and return 0&semi; otherwise, return a non&hyphen;zero value with no effect on the count&period;

== Synopsis

Declared in `&lt;bslmt&lowbar;timedsemaphore&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
tryWait();
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
