Merge pull request #2111 from yodaldevoid/more-ticks

time: Add tick rates in multiples of 10 kHz
This commit is contained in:
Dario Nieuwenhuis 2023-10-24 19:51:24 +00:00 committed by GitHub
commit f956d19e6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 82 additions and 0 deletions

View file

@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## 0.1.6 - ???
- Added tick rates in multiples of 10 kHz
## 0.1.5 - 2023-10-16
- Added `links` key to Cargo.toml, to prevent multiple copies of this crate in the same binary.

View file

@ -126,6 +126,25 @@ tick-hz-65_536_000 = []
tick-hz-131_072_000 = []
tick-hz-262_144_000 = []
tick-hz-524_288_000 = []
tick-hz-20_000 = []
tick-hz-40_000 = []
tick-hz-80_000 = []
tick-hz-160_000 = []
tick-hz-320_000 = []
tick-hz-640_000 = []
tick-hz-1_280_000 = []
tick-hz-2_560_000 = []
tick-hz-5_120_000 = []
tick-hz-10_240_000 = []
tick-hz-20_480_000 = []
tick-hz-40_960_000 = []
tick-hz-81_920_000 = []
tick-hz-163_840_000 = []
tick-hz-327_680_000 = []
tick-hz-655_360_000 = []
tick-hz-1_310_720_000 = []
tick-hz-2_621_440_000 = []
tick-hz-5_242_880_000 = []
tick-hz-2_000_000 = []
tick-hz-3_000_000 = []
tick-hz-4_000_000 = []

View file

@ -13,6 +13,8 @@ for i in range(1, 25):
ticks.append(2**i)
for i in range(1, 20):
ticks.append(2**i * 1000)
for i in range(1, 20):
ticks.append(2**i * 10000)
for i in range(1, 10):
ticks.append(2**i * 1000000)
ticks.append(2**i * 9 // 8 * 1000000)

View file

@ -106,6 +106,44 @@ pub const TICK_HZ: u64 = 131_072_000;
pub const TICK_HZ: u64 = 262_144_000;
#[cfg(feature = "tick-hz-524_288_000")]
pub const TICK_HZ: u64 = 524_288_000;
#[cfg(feature = "tick-hz-20_000")]
pub const TICK_HZ: u64 = 20_000;
#[cfg(feature = "tick-hz-40_000")]
pub const TICK_HZ: u64 = 40_000;
#[cfg(feature = "tick-hz-80_000")]
pub const TICK_HZ: u64 = 80_000;
#[cfg(feature = "tick-hz-160_000")]
pub const TICK_HZ: u64 = 160_000;
#[cfg(feature = "tick-hz-320_000")]
pub const TICK_HZ: u64 = 320_000;
#[cfg(feature = "tick-hz-640_000")]
pub const TICK_HZ: u64 = 640_000;
#[cfg(feature = "tick-hz-1_280_000")]
pub const TICK_HZ: u64 = 1_280_000;
#[cfg(feature = "tick-hz-2_560_000")]
pub const TICK_HZ: u64 = 2_560_000;
#[cfg(feature = "tick-hz-5_120_000")]
pub const TICK_HZ: u64 = 5_120_000;
#[cfg(feature = "tick-hz-10_240_000")]
pub const TICK_HZ: u64 = 10_240_000;
#[cfg(feature = "tick-hz-20_480_000")]
pub const TICK_HZ: u64 = 20_480_000;
#[cfg(feature = "tick-hz-40_960_000")]
pub const TICK_HZ: u64 = 40_960_000;
#[cfg(feature = "tick-hz-81_920_000")]
pub const TICK_HZ: u64 = 81_920_000;
#[cfg(feature = "tick-hz-163_840_000")]
pub const TICK_HZ: u64 = 163_840_000;
#[cfg(feature = "tick-hz-327_680_000")]
pub const TICK_HZ: u64 = 327_680_000;
#[cfg(feature = "tick-hz-655_360_000")]
pub const TICK_HZ: u64 = 655_360_000;
#[cfg(feature = "tick-hz-1_310_720_000")]
pub const TICK_HZ: u64 = 1_310_720_000;
#[cfg(feature = "tick-hz-2_621_440_000")]
pub const TICK_HZ: u64 = 2_621_440_000;
#[cfg(feature = "tick-hz-5_242_880_000")]
pub const TICK_HZ: u64 = 5_242_880_000;
#[cfg(feature = "tick-hz-2_000_000")]
pub const TICK_HZ: u64 = 2_000_000;
#[cfg(feature = "tick-hz-3_000_000")]
@ -334,6 +372,25 @@ pub const TICK_HZ: u64 = 980_000_000;
feature = "tick-hz-131_072_000",
feature = "tick-hz-262_144_000",
feature = "tick-hz-524_288_000",
feature = "tick-hz-20_000",
feature = "tick-hz-40_000",
feature = "tick-hz-80_000",
feature = "tick-hz-160_000",
feature = "tick-hz-320_000",
feature = "tick-hz-640_000",
feature = "tick-hz-1_280_000",
feature = "tick-hz-2_560_000",
feature = "tick-hz-5_120_000",
feature = "tick-hz-10_240_000",
feature = "tick-hz-20_480_000",
feature = "tick-hz-40_960_000",
feature = "tick-hz-81_920_000",
feature = "tick-hz-163_840_000",
feature = "tick-hz-327_680_000",
feature = "tick-hz-655_360_000",
feature = "tick-hz-1_310_720_000",
feature = "tick-hz-2_621_440_000",
feature = "tick-hz-5_242_880_000",
feature = "tick-hz-2_000_000",
feature = "tick-hz-3_000_000",
feature = "tick-hz-4_000_000",