3 ms·
Ah, that's fair. Didn't realize there was a significant performance impact.
by zaptrem 2y ago
Ah, that's fair. Didn't realize there was a significant performance impact.
- tialaramex 2y agoEventually Rust just gave up. Here you go, here's your "monotonically increasing clock" courtesy of your operating system. It might go backwards, try asking your vendor to "fix" that and see if they laugh at you or just ignore you. Sometimes the OS is broken in a way Rust can fix, for example Rust's current std::sync::RwLock actually does what you wanted on Windows, the C++ std::shared_mutex doesn't. It's documented as working, but it doesn't because the OS is broken and the fix is just on their internal git "next release" branch, not in the Windows you or your customers are running. But sometimes you're just out of luck. Some minority or older operating systems can't do std::fs::remove_dir_all correctly, so, too bad you get the platform behaviour. It's probably fine, unless it isn't, in which case you should use a real OS.