> ## 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.

# File timestamp.h

![][C++]

**Location**: `core/time/i_clock/timestamp.h`

## Classes

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

## Namespaces

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

## Includes

* core/export/simfwk\_core\_export.h
* \<cstdint>
* \<iomanip>
* \<iostream>
* \<string>

## Included by

* [i\_activity.h](https://developer.synopsys.com/docs/avxcelerate/avxcelerate-simulation-framework/reference/i__activity_8h.md)
* [i\_clock.h](https://developer.synopsys.com/docs/avxcelerate/avxcelerate-simulation-framework/reference/i__clock_8h.md)
* [i\_scheduler\_client.h](https://developer.synopsys.com/docs/avxcelerate/avxcelerate-simulation-framework/reference/i__scheduler__client_8h.md)

## Source

```cpp theme={null}


#ifndef SIMFWK_CORE_TIME_ICLOCK_TIMESTAMP_H
#define SIMFWK_CORE_TIME_ICLOCK_TIMESTAMP_H

#include "core/export/simfwk_core_export.h"
#include <cstdint>
#include <iomanip>
#include <iostream>
#include <string>
namespace simulation_framework
{
namespace core
{
namespace time
{

struct SIMFWK_CORE_API Timestamp
{
    uint32_t seconds;
    uint32_t nanoseconds;
    std::string DebugString() const
    {
        return "Simulation timestamp: " + std::to_string(seconds) + " second and " + std::to_string(nanoseconds) +
               " nanos ";
    }
};

inline bool operator==(const Timestamp& lhs, const Timestamp& rhs)
{
    return (lhs.seconds == rhs.seconds) && (lhs.nanoseconds == rhs.nanoseconds);
}

inline std::ostream& operator<<(std::ostream& os, const Timestamp& timestamp)
{
    double formatted_time = timestamp.seconds + timestamp.nanoseconds * 1e-9;
    os << std::right << std::setw(10) << std::fixed << std::setprecision(3) << formatted_time << " s";
    return os;
}

}  // namespace time
}  // namespace core
}  // namespace simulation_framework

#endif  // SIMFWK_CORE_TIME_ICLOCK_TIMESTAMP_H
```

[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++"

[protected]: https://img.shields.io/badge/-protected-yellow "protected"

[static]: https://img.shields.io/badge/-static-lightgrey "static"
