[#BloombergLP-bslmt-TimedCompletionGuard-2constructor-0d] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/TimedCompletionGuard.adoc[TimedCompletionGuard]::TimedCompletionGuard :relfileprefix: ../../../ :mrdocs: Create the guard using the specified `function` handler invoked when a set duration expires. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is not specified, the currently installed default allocator is used. == Synopsis Declared in `<bslmt_timedcompletionguard.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- TimedCompletionGuard( xref:BloombergLP/bslmt/TimedCompletionGuard/Handler.adoc[Handler] function, xref:BloombergLP/bslmt/TimedCompletionGuard/allocator_type.adoc[allocator_type] const& basicAllocator = allocator_type()); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#