mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 02:48:34 +00:00
0de8672044
This PR adds a `SystemClock` trait for abstracting away the system clock. This allows us to swap out the real system clock with a `FakeSystemClock` in the tests, thus allowing the fake passage of time. We're using this in `Telemetry` to better mock the clock for testing purposes. Release Notes: - N/A
18 lines
315 B
TOML
18 lines
315 B
TOML
[package]
|
|
name = "clock"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
publish = false
|
|
license = "GPL-3.0-or-later"
|
|
|
|
[lib]
|
|
path = "src/clock.rs"
|
|
doctest = false
|
|
|
|
[features]
|
|
test-support = ["dep:parking_lot"]
|
|
|
|
[dependencies]
|
|
chrono.workspace = true
|
|
parking_lot = { workspace = true, optional = true }
|
|
smallvec.workspace = true
|