Returns the current UNIX timestamp in seconds.
()
| 116 | |
| 117 | /// Returns the current UNIX timestamp in seconds. |
| 118 | pub fn current_timestamp() -> i64 { |
| 119 | std::time::SystemTime::now() |
| 120 | .duration_since(std::time::UNIX_EPOCH) |
| 121 | .unwrap_or_default() |
| 122 | .as_secs() as i64 |
| 123 | } |
| 124 | |
| 125 | /// Returns `true` if the file path looks like a test file. |
| 126 | pub fn is_test_file(path: &str) -> bool { |
no outgoing calls