Skip to content

Commit

Permalink
add uniform precision to rust-g timestamp (#141)
Browse files Browse the repository at this point in the history
* add precision to rust-g timestamp

* coping
  • Loading branch information
ZephyrTFA authored Jun 29, 2023
1 parent d8097d3 commit e9f41f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ byond_fn!(fn time_reset(instant_id) {

byond_fn!(
fn unix_timestamp() {
Some(
Some(format!(
"{:.6}",
std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.unwrap()
.as_secs_f64()
.to_string(),
)
))
}
);

0 comments on commit e9f41f4

Please sign in to comment.