Use Instant not chrono for telemetry (#20756)
We occasionally see dates in the future appearing in our telemetry. One hypothesis is that this is caused by a clock change while Zed is running causing date math based on chrono to be incorrect. Instant *should* be a more stable source of relative timestamps. Release Notes: - N/A
This commit is contained in:
parent
9454f0f1c7
commit
6a2c712990
12 changed files with 54 additions and 74 deletions
|
@ -1133,7 +1133,7 @@ impl Project {
|
|||
|
||||
let fs = Arc::new(RealFs::default());
|
||||
let languages = LanguageRegistry::test(cx.background_executor().clone());
|
||||
let clock = Arc::new(FakeSystemClock::default());
|
||||
let clock = Arc::new(FakeSystemClock::new());
|
||||
let http_client = http_client::FakeHttpClient::with_404_response();
|
||||
let client = cx
|
||||
.update(|cx| client::Client::new(clock, http_client.clone(), cx))
|
||||
|
@ -1179,7 +1179,7 @@ impl Project {
|
|||
use gpui::Context;
|
||||
|
||||
let languages = LanguageRegistry::test(cx.executor());
|
||||
let clock = Arc::new(FakeSystemClock::default());
|
||||
let clock = Arc::new(FakeSystemClock::new());
|
||||
let http_client = http_client::FakeHttpClient::with_404_response();
|
||||
let client = cx.update(|cx| client::Client::new(clock, http_client.clone(), cx));
|
||||
let user_store = cx.new_model(|cx| UserStore::new(client.clone(), cx));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue