<ahref="time__limit_8cc.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aid="l00001"name="l00001"></a><spanclass="lineno"> 1</span><spanclass="comment">// Copyright 2010-2021 Google LLC</span></div>
<divclass="line"><aid="l00002"name="l00002"></a><spanclass="lineno"> 2</span><spanclass="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span></div>
<divclass="line"><aid="l00003"name="l00003"></a><spanclass="lineno"> 3</span><spanclass="comment">// you may not use this file except in compliance with the License.</span></div>
<divclass="line"><aid="l00004"name="l00004"></a><spanclass="lineno"> 4</span><spanclass="comment">// You may obtain a copy of the License at</span></div>
<divclass="line"><aid="l00008"name="l00008"></a><spanclass="lineno"> 8</span><spanclass="comment">// Unless required by applicable law or agreed to in writing, software</span></div>
<divclass="line"><aid="l00009"name="l00009"></a><spanclass="lineno"> 9</span><spanclass="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></div>
<divclass="line"><aid="l00010"name="l00010"></a><spanclass="lineno"> 10</span><spanclass="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<divclass="line"><aid="l00011"name="l00011"></a><spanclass="lineno"> 11</span><spanclass="comment">// See the License for the specific language governing permissions and</span></div>
<divclass="line"><aid="l00012"name="l00012"></a><spanclass="lineno"> 12</span><spanclass="comment">// limitations under the License.</span></div>
<divclass="line"><aid="l00019"name="l00019"></a><spanclass="lineno"> 19</span><spanclass="stringliteral">"If true, rely on the user time in the TimeLimit class. This is "</span></div>
<divclass="line"><aid="l00020"name="l00020"></a><spanclass="lineno"> 20</span><spanclass="stringliteral">"only recommended for benchmarking on a non-isolated environment."</span>);</div>
<divclass="line"><aid="l00023"name="l00023"></a><spanclass="lineno"> 23</span><spanclass="stringliteral">"If true, measures the number of instructions executed"</span>);</div>
<divclass="ttc"id="aclassoperations__research_1_1_nested_time_limit_html_acc74615391497a1874ffb69d751f80af"><divclass="ttname"><ahref="classoperations__research_1_1_nested_time_limit.html#acc74615391497a1874ffb69d751f80af">operations_research::NestedTimeLimit::~NestedTimeLimit</a></div><divclass="ttdeci">~NestedTimeLimit()</div><divclass="ttdoc">Updates elapsed deterministic time in the base time limit object.</div><divclass="ttdef"><b>Definition:</b><ahref="time__limit_8cc_source.html#l00060">time_limit.cc:60</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1_nested_time_limit_html_af23d2dc1b291081b642a728cf0033987"><divclass="ttname"><ahref="classoperations__research_1_1_nested_time_limit.html#af23d2dc1b291081b642a728cf0033987">operations_research::NestedTimeLimit::NestedTimeLimit</a></div><divclass="ttdeci">NestedTimeLimit(TimeLimit *base_time_limit, double limit_in_seconds, double deterministic_limit)</div><divclass="ttdoc">Creates the nested time limit.</div><divclass="ttdef"><b>Definition:</b><ahref="time__limit_8cc_source.html#l00047">time_limit.cc:47</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1_time_limit_html"><divclass="ttname"><ahref="classoperations__research_1_1_time_limit.html">operations_research::TimeLimit</a></div><divclass="ttdoc">A simple class to enforce both an elapsed time limit and a deterministic time limit in the same threa...</div><divclass="ttdef"><b>Definition:</b><ahref="time__limit_8h_source.html#l00106">time_limit.h:106</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1_time_limit_html_a362a88bfe50d83c028154a62ef53e780"><divclass="ttname"><ahref="classoperations__research_1_1_time_limit.html#a362a88bfe50d83c028154a62ef53e780">operations_research::TimeLimit::GetDeterministicTimeLeft</a></div><divclass="ttdeci">double GetDeterministicTimeLeft() const</div><divclass="ttdoc">Returns the remaining deterministic time before LimitReached() returns true due to the deterministic ...</div><divclass="ttdef"><b>Definition:</b><ahref="time__limit_8h_source.html#l00213">time_limit.h:213</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1_time_limit_html_a4273b83b06bfbf856393db6d0a9b8715"><divclass="ttname"><ahref="classoperations__research_1_1_time_limit.html#a4273b83b06bfbf856393db6d0a9b8715">operations_research::TimeLimit::GetTimeLeft</a></div><divclass="ttdeci">double GetTimeLeft() const</div><divclass="ttdoc">Returns the time left on this limit, or 0 if the limit was reached (it never returns a negative value...</div><divclass="ttdef"><b>Definition:</b><ahref="time__limit_8h_source.html#l00584">time_limit.h:584</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1_time_limit_html_a5b6cf15a55615535aa54e71103de8d9f"><divclass="ttname"><ahref="classoperations__research_1_1_time_limit.html#a5b6cf15a55615535aa54e71103de8d9f">operations_research::TimeLimit::RegisterExternalBooleanAsLimit</a></div><divclass="ttdeci">void RegisterExternalBooleanAsLimit(std::atomic< bool > *external_boolean_as_limit)</div><divclass="ttdoc">Registers the external Boolean to check when LimitReached() is called.</div><divclass="ttdef"><b>Definition:</b><ahref="time__limit_8h_source.html#l00274">time_limit.h:274</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1_time_limit_html_a764be64f3029f8b8e23511061d8de355"><divclass="ttname"><ahref="classoperations__research_1_1_time_limit.html#a764be64f3029f8b8e23511061d8de355">operations_research::TimeLimit::DebugString</a></div><divclass="ttdeci">std::string DebugString() const</div><divclass="ttdoc">Returns information about the time limit object in a human-readable form.</div><divclass="ttdef"><b>Definition:</b><ahref="time__limit_8cc_source.html#l00031">time_limit.cc:31</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1_time_limit_html_ac62fbbc5383a86a9fe334e3213f6244b"><divclass="ttname"><ahref="classoperations__research_1_1_time_limit.html#ac62fbbc5383a86a9fe334e3213f6244b">operations_research::TimeLimit::kHistorySize</a></div><divclass="ttdeci">static const int kHistorySize</div><divclass="ttdef"><b>Definition:</b><ahref="time__limit_8h_source.html#l00109">time_limit.h:109</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1_time_limit_html_ac7e861414a70fc937d18bc7ca743fc98"><divclass="ttname"><ahref="classoperations__research_1_1_time_limit.html#ac7e861414a70fc937d18bc7ca743fc98">operations_research::TimeLimit::GetElapsedDeterministicTime</a></div><divclass="ttdeci">double GetElapsedDeterministicTime() const</div><divclass="ttdoc">Returns the elapsed deterministic time since the construction of this object.</div><divclass="ttdef"><b>Definition:</b><ahref="time__limit_8h_source.html#l00261">time_limit.h:261</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1_time_limit_html_ae3fe2e2b613455b49c6cc74dd3c7581e"><divclass="ttname"><ahref="classoperations__research_1_1_time_limit.html#ae3fe2e2b613455b49c6cc74dd3c7581e">operations_research::TimeLimit::GetElapsedTime</a></div><divclass="ttdeci">double GetElapsedTime() const</div><divclass="ttdoc">Returns the time elapsed in seconds since the construction of this object.</div><divclass="ttdef"><b>Definition:</b><ahref="time__limit_8h_source.html#l00252">time_limit.h:252</a></div></div>
<divclass="ttc"id="aclassoperations__research_1_1_time_limit_html_af90cfd1fc238433fc303ee28c5914eb9"><divclass="ttname"><ahref="classoperations__research_1_1_time_limit.html#af90cfd1fc238433fc303ee28c5914eb9">operations_research::TimeLimit::AdvanceDeterministicTime</a></div><divclass="ttdeci">void AdvanceDeterministicTime(double deterministic_duration)</div><divclass="ttdoc">Advances the deterministic time.</div><divclass="ttdef"><b>Definition:</b><ahref="time__limit_8h_source.html#l00227">time_limit.h:227</a></div></div>
<divclass="ttc"id="anamespaceoperations__research_html"><divclass="ttname"><ahref="namespaceoperations__research.html">operations_research</a></div><divclass="ttdoc">Collection of objects used to extend the Constraint Solver library.</div><divclass="ttdef"><b>Definition:</b><ahref="dense__doubly__linked__list_8h_source.html#l00021">dense_doubly_linked_list.h:21</a></div></div>
<divclass="ttc"id="atime__limit_8cc_html_ad9d2d29e2ac7e6245aed7fcfe75c1631"><divclass="ttname"><ahref="time__limit_8cc.html#ad9d2d29e2ac7e6245aed7fcfe75c1631">ABSL_FLAG</a></div><divclass="ttdeci">ABSL_FLAG(bool, time_limit_use_usertime, false, "If true, rely on the user time in the TimeLimit class. This is ""only recommended for benchmarking on a non-isolated environment.")</div></div>