Skip to content

Commit 6378d35

Browse files
committed
simplify to Timestamp::now()
1 parent f2b84ce commit 6378d35

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/agent/services/lazer_exporter.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ mod lazer_exporter {
164164
state::local::LocalStore,
165165
},
166166
anyhow::bail,
167-
chrono::Utc,
168167
ed25519_dalek::{
169168
Keypair,
170169
Signer,
@@ -257,12 +256,7 @@ mod lazer_exporter {
257256
loop {
258257
tokio::select! {
259258
_ = publish_interval.tick() => {
260-
let now = Utc::now().timestamp_micros();
261-
let publisher_timestamp = MessageField::some(Timestamp {
262-
seconds: now / 1_000_000,
263-
nanos: (now % 1_000_000 * 1000) as i32,
264-
special_fields: Default::default(),
265-
});
259+
let publisher_timestamp = MessageField::some(Timestamp::now());
266260
let mut publisher_update = PublisherUpdate {
267261
updates: vec![],
268262
publisher_id: Some(config.publisher_id),

0 commit comments

Comments
 (0)