Skip to content

Commit 7b453e2

Browse files
ZephyrTFAitsmeow
authored andcommitted
add uniform precision to rust-g timestamp (tgstation#141)
* add precision to rust-g timestamp * coping
1 parent c8f4daf commit 7b453e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/time.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ byond_fn!(fn time_reset(instant_id) {
3838

3939
byond_fn!(
4040
fn unix_timestamp() {
41-
Some(
41+
Some(format!(
42+
"{:.6}",
4243
std::time::SystemTime::now()
4344
.duration_since(std::time::UNIX_EPOCH)
4445
.unwrap()
4546
.as_secs_f64()
46-
.to_string(),
47-
)
47+
))
4848
}
4949
);

0 commit comments

Comments
 (0)