mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Replace time with std::time in components/net (#31079)
* Replace time with std::time in components/net Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Fix cookie::test_sort_order test Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
This commit is contained in:
parent
d86e713a9c
commit
580062228b
13 changed files with 161 additions and 123 deletions
|
@ -122,7 +122,10 @@ impl HttpState {
|
|||
}
|
||||
|
||||
fn precise_time_ms() -> u64 {
|
||||
time::precise_time_ns() / (1000 * 1000)
|
||||
SystemTime::now()
|
||||
.duration_since(UNIX_EPOCH)
|
||||
.unwrap_or_default()
|
||||
.as_millis() as u64
|
||||
}
|
||||
|
||||
// Step 3 of https://fetch.spec.whatwg.org/#concept-fetch.
|
||||
|
@ -2108,7 +2111,6 @@ async fn cors_preflight_fetch(
|
|||
.typed_get::<AccessControlMaxAge>()
|
||||
.map(|acma| acma.into())
|
||||
.unwrap_or(Duration::from_secs(5));
|
||||
let max_age = max_age.as_secs() as u32;
|
||||
// Substep 10
|
||||
// TODO: Need to define what an imposed limit on max-age is
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue