[#BloombergLP-bdlcc-TimeQueue-09c-add-06]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlcc.adoc[bdlcc]::xref:BloombergLP/bdlcc/TimeQueue-09c.adoc[TimeQueue]::add
:relfileprefix: ../../../
:mrdocs:

Same as the preceding overload, with the specified `key`&period;

== Synopsis

Declared in `&lt;bdlcc&lowbar;timequeue&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlcc/TimeQueue-09c/Handle.adoc[TimeQueue&lt;DATA&gt;::Handle]
add(
    xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval] const& time,
    DATA const& data,
    xref:BloombergLP/bdlcc/TimeQueue-09c/Key.adoc[Key] const& key,
    int* isNewTop = 0,
    int* newLength = 0);
----

== Return Value

handle for the item, or &hyphen;1 if the queue is full

== Parameters

[cols="1,4"]
|===
| Name| Description
| *time*
| scheduled time for the item
| *data*
| data associated with the item
| *key*
| key used to uniquely identify the item
| *isNewTop*
| optional flag set if the item is the new lowest
| *newLength*
| optional location for the new queue length
|===


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