Skip to content

Commit

Permalink
try get rid of paprika
Browse files Browse the repository at this point in the history
  • Loading branch information
cipig committed Mar 22, 2024
1 parent 17816e8 commit a181b8b
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/core/atomicdex/services/price/global.provider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,32 +92,8 @@ namespace
}
} // namespace


namespace atomic_dex
{
global_price_service::global_price_service(entt::registry& registry, ag::ecs::system_manager& system_manager, atomic_dex::cfg& cfg) :
system(registry), m_system_manager(system_manager), m_cfg(cfg)
{
m_update_clock = std::chrono::high_resolution_clock::now();
}
} // namespace atomic_dex

namespace atomic_dex
{
void
global_price_service::update()
{
using namespace std::chrono_literals;

const auto now = std::chrono::high_resolution_clock::now();
const auto s = std::chrono::duration_cast<std::chrono::seconds>(now - m_update_clock);
if (s >= 5min)
{
SPDLOG_INFO("[global_price_service::update()] - 5min elapsed, updating providers");
m_update_clock = std::chrono::high_resolution_clock::now();
}
}

std::string
global_price_service::get_rate_conversion(const std::string& fiat, const std::string& ticker_in, bool adjusted) const
{
Expand Down

0 comments on commit a181b8b

Please sign in to comment.