package core_kernel
Industrial strength alternative to OCaml's standard library
Install
Dune Dependency
Authors
Maintainers
Sources
v0.13.1.tar.gz
sha256=2e9dec37cf1b1a05fa3ad24ae8efd1e389b82928d598db097771405da1d6b214
md5=ee4f3b03ce7fa4cb0c27e9b02cc7712d
doc/core_kernel.limiter/Limiter/Token_bucket/index.html
Module Limiter.Token_bucket
Implements a basic token-bucket-based rate limiter. Users of the throttle must successfully call try_take
before doing work.
type t = private limiter
val create_exn :
now:Core_kernel.Time_ns.t ->
burst_size:int ->
sustained_rate_per_sec:float ->
?initial_bucket_level:int ->
unit ->
t
val try_take : t -> now:Core_kernel.Time_ns.t -> int -> Try_take_result.t
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>