Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
span in feature
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitriTimoz committed Dec 24, 2023
1 parent 7066adb commit 5484b93
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions minecraft-server/src/entities/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,10 @@ impl Handler<Player> {
use ServerMessage::*;
match message {
Tick(tick_id) => {
let span = info_span!("player tick");
let _enter = span.enter();
#[cfg(feature = "tracing")] {
let span = info_span!("player tick");
let _enter: tracing::span::Entered<'_> = span.enter();
}

if tick_id % (20*10) == 0 {
self.send_packet(PlayClientbound::KeepAlive { keep_alive_id: tick_id as u64 }).await;
Expand Down

0 comments on commit 5484b93

Please sign in to comment.