<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/web-time-compat/src/stdlib.rs, branch arti-v2.5.1</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v2.5.1</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v2.5.1'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2026-03-26T19:20:16Z</updated>
<entry>
<title>Add a new web-time-compat crate.</title>
<updated>2026-03-26T19:20:16Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2026-03-26T12:28:09Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=418d4b802c4fa269b2e47b7405c04fb72ff2f146'/>
<id>urn:sha1:418d4b802c4fa269b2e47b7405c04fb72ff2f146</id>
<content type='text'>
This crate provides a compatibility layer in front of web-time,
which will serve three purposes:

1. Saving us from having to build web_time when we don't need it.

   (This is mainly aesthetic.)

2. Allowing us to continue to use std::time::SystemTime to represent
   our wall-clock times and dates.

   This is fairly valuable, since we use a bunch of external crates
   that expect std::time::SystemTime inputs and don't want a
   web_time::SystemTime.

3. Add extension methods to web_time::Instant and std::time::Instant
   so that we can enforce the use of web_time::Instant by
   disallowing std::time::Instant::now().

   (We can't just use the same trick as in (2) to use
   std::time::Instant everywhere, since there is no way to convert a
   web_time::Instant to a std::time::Instant.)
</content>
</entry>
</feed>
