File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,10 +72,10 @@ mod test_db {
7272 status : hyper:: StatusCode :: OK ,
7373 len_bytes : 100 ,
7474 start_latency_correction : None ,
75- start : crate :: small_instant :: SmallInstant :: now ( ) ,
75+ start : start + std :: time :: Duration :: from_millis ( 50 ) ,
7676 connection_time : None ,
7777 first_byte : None ,
78- end : crate :: small_instant :: SmallInstant :: now ( ) ,
78+ end : start + std :: time :: Duration :: from_millis ( 150 ) ,
7979 } ;
8080 let test_vec = vec ! [ test_val. clone( ) , test_val. clone( ) ] ;
8181 let client = Client :: default ( ) ;
Original file line number Diff line number Diff line change @@ -14,8 +14,9 @@ pub struct SmallInstant {
1414
1515impl SmallInstant {
1616 pub fn now ( ) -> Self {
17+ let start = * START_INSTANT ;
1718 let now = std:: time:: Instant :: now ( ) ;
18- let nanos = now. duration_since ( * START_INSTANT ) . as_nanos ( ) as u64 ;
19+ let nanos = now. duration_since ( start ) . as_nanos ( ) as u64 ;
1920
2021 SmallInstant {
2122 nanos : NonZeroU64 :: new ( nanos) . unwrap ( ) ,
You can’t perform that action at this time.
0 commit comments