ITCHCPP 1.6.0
High-Performance NASDAQ TotalView-ITCH 5.0 Parser & Market-Data Platform
Loading...
Searching...
No Matches
itch::analytics::TimeClock Struct Reference

A clock that buckets trades by wall-clock time (nanoseconds). More...

#include <bars.hpp>

Public Member Functions

auto bucket (const Trade &trade, std::uint64_t, std::uint64_t) const noexcept -> std::uint64_t
 Computes the bucket id for trade from its wall-clock timestamp.
 

Public Attributes

std::uint64_t interval_ns {1}
 

Detailed Description

A clock that buckets trades by wall-clock time (nanoseconds).

Definition at line 39 of file bars.hpp.

Member Function Documentation

◆ bucket()

auto itch::analytics::TimeClock::bucket ( const Trade trade,
std::uint64_t  ,
std::uint64_t   
) const -> std::uint64_t
inlinenoexcept

Computes the bucket id for trade from its wall-clock timestamp.

Parameters
tradeThe trade whose timestamp determines the bucket.
Returns
The bucket id, trade.timestamp / interval_ns.

Definition at line 46 of file bars.hpp.

References interval_ns.

Member Data Documentation

◆ interval_ns

std::uint64_t itch::analytics::TimeClock::interval_ns {1}

Definition at line 40 of file bars.hpp.

Referenced by bucket().


The documentation for this struct was generated from the following file: