Instance Propertyordo-one.package-concurrency-helpers 5.1.0Helpers
currentCount
Current count since the last checkpoint mark.
var currentCount: UInt64 { get }
Current count since the last checkpoint mark.
var currentCount: UInt64 { get }
s7Helpers19TimeIntervalCounterV12currentCounts6UInt64Vvp
What are these?2QJJJ
import Helpers
struct TimeIntervalCounter<Time> where Time : Clock
This class tracks counter during the specified time interval
@frozen struct UInt64
A 64-bit unsigned integer value type.
init(clock: Time, timeInterval: Time.Duration, initialCount: UInt64 = 0)
mutating func checkpoint(_ body: (UInt64) -> Void)
Executes passed closure once the checkpoint time interval has been reached. The checkpoint count is incremented with each invocatation
mutating func checkpoint(eventTime: Time.Instant, _ body: (UInt64) -> Void)
Executes passed closure once the checkpoint time interval based on provided event time The checkpoint count is incremented with each invocatation
mutating func incremenet() -> Bool
Increments counter returns true
if timeinterval has been reached uses Time.now as a time point
mutating func incremenet(eventTime: Time.Instant) -> Bool
Increments counter returns true
if timeinterval has been reached with provided time
mutating func reset()
Sets counter to zero and resets checkpoint time