---
title: llarp/util/time.hpp

---

# llarp/util/time.hpp



## Namespaces

| Name           |
| -------------- |
| **[llarp](Namespaces/namespacellarp.md)** <br>[crypto.hpp] |
| **[std::chrono_literals](Namespaces/namespacestd_1_1chrono__literals.md)**  |




## Source code

```cpp
#pragma once

#include "types.hpp"
#include <nlohmann/json.hpp>
#include <iostream>

using namespace std::chrono_literals;

namespace llarp
{
  Duration_t
  time_now_ms();

  Duration_t
  uptime();

  uint64_t
  ToMS(Duration_t duration);

  std::ostream&
  operator<<(std::ostream& out, const Duration_t& t);

  nlohmann::json
  to_json(const Duration_t& t);

}  // namespace llarp
```


-------------------------------

Updated on 2022-04-18 at 19:54:46 +0000
