> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class simulation_framework::autonomy::SimulationCompletionChecker

![][C++]
![][public]

**Definition**: `autonomy/simulation/simulation_completion_checker/simulation_completion_checker.h` (line 36)

Checks for the completion status of a simulation.

The `SimulationCompletionChecker` class implements the `ISimulationCompletionChecker` interface to determine whether a simulation has finished. It uses a clock interface only as duration depends on actual run and shutdown triggers.

The class leverages the clock interface for time-based operations.

**See also**: ISimulationCompletionChecker, [core::time::IClock](https://developer.synopsys.com/docs/avxcelerate/avxcelerate-simulation-framework/reference/classsimulation__framework_1_1core_1_1time_1_1IClock.md)

**Inherits from**:

* [simulation\_framework::core::time::ISimulationCompletionChecker](https://developer.synopsys.com/docs/avxcelerate/avxcelerate-simulation-framework/reference/classsimulation__framework_1_1core_1_1time_1_1ISimulationCompletionChecker.md)

## Members

* [GetSimulationDuration](#classsimulation__framework_1_1autonomy_1_1SimulationCompletionChecker_1a674728b07de32646b3cb51aa3e24f61f)
* [IsSimulationFinished](#classsimulation__framework_1_1autonomy_1_1SimulationCompletionChecker_1a0645db7a9eac221d6bb082aa9e17ee40)
* [SimulationCompletionChecker](#classsimulation__framework_1_1autonomy_1_1SimulationCompletionChecker_1a85bd966e1832c48fc6c12667dc5f5e78)
* [\~ISimulationCompletionChecker](https://developer.synopsys.com/docs/avxcelerate/avxcelerate-simulation-framework/reference/classsimulation__framework_1_1core_1_1time_1_1ISimulationCompletionChecker.md#classsimulation__framework_1_1core_1_1time_1_1ISimulationCompletionChecker_1ac4b8c8898ef46c452ef5631a5c4c62ee)

## Public functions

### Function SimulationCompletionChecker

![][public]

```cpp theme={null}
simulation_framework::autonomy::SimulationCompletionChecker::SimulationCompletionChecker(std::shared_ptr< core::time::IClock > clock_ptr)
```

Constructs a `SimulationCompletionChecker` instance.

Initializes the checker with a clock interface.

**Parameters**:

* **clock\_ptr**: A shared pointer to the clock interface for time management during the simulation.

**Parameters**:

* std::shared\_ptr\< [core::time::IClock](https://developer.synopsys.com/docs/avxcelerate/avxcelerate-simulation-framework/reference/classsimulation__framework_1_1core_1_1time_1_1IClock.md) > **clock\_ptr**

**Return type**:

### Function IsSimulationFinished

![][public]
![][const]

```cpp theme={null}
bool simulation_framework::autonomy::SimulationCompletionChecker::IsSimulationFinished() const
```

Checks if the simulation has completed.

**Returns**:

`false` always for interface completion purpose, actual completion depends on the run and shutdown triggers.

**Return type**: [bool](https://developer.synopsys.com/docs/avxcelerate/avxcelerate-simulation-framework/reference/classsimulation__framework_1_1core_1_1Topic.md)

**Reimplements**: [IsSimulationFinished](https://developer.synopsys.com/docs/avxcelerate/avxcelerate-simulation-framework/reference/classsimulation__framework_1_1core_1_1time_1_1ISimulationCompletionChecker.md#classsimulation__framework_1_1core_1_1time_1_1ISimulationCompletionChecker_1a3c2a846e58738327837d794ed4ce6136)

### Function GetSimulationDuration

![][public]
![][const]

```cpp theme={null}
std::chrono::milliseconds simulation_framework::autonomy::SimulationCompletionChecker::GetSimulationDuration() const
```

Retrieves the total duration of the simulation.

Returns the default value of -1 as scenario duration depends on the actual run.

**Returns**:

The total simulation duration in milliseconds.

**Return type**: std::chrono::milliseconds

**Reimplements**: [GetSimulationDuration](https://developer.synopsys.com/docs/avxcelerate/avxcelerate-simulation-framework/reference/classsimulation__framework_1_1core_1_1time_1_1ISimulationCompletionChecker.md#classsimulation__framework_1_1core_1_1time_1_1ISimulationCompletionChecker_1a7c36f8d7309df7770a08208f5157a3a1)

[private]: https://img.shields.io/badge/-private-red "private"

[public]: https://img.shields.io/badge/-public-brightgreen "public"

[const]: https://img.shields.io/badge/-const-lightblue "const"

[C++]: https://img.shields.io/badge/language-C%2B%2B-blue "C++"
