Skip to content

Commit

Permalink
improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy committed Nov 28, 2024
1 parent 3cf5619 commit 96a23b2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/time/src/timestamp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ use time::OffsetDateTime;
* average, while the usual format!() approach takes nearly 200ns on
* average - both excluding the SystemTime::now().duration_since(UNIX_EPOCH)
* stuff, mind you.
*
* all this for a microscopic improvement over the much easier
* `format!("{:.6}", duration.as_secs_f64())`
* but this is a very hot proc, due to logging stuff, so if it counts
* anywhere, it'll be here, i guess?
*/
#[byond_fn]
pub fn unix_timestamp() -> String {
Expand Down

0 comments on commit 96a23b2

Please sign in to comment.