Skip to content

Commit 24287a2

Browse files
committed
cleanup rebase fallout
1 parent 19af650 commit 24287a2

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/session.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,17 +97,8 @@ impl Session {
9797
/// let until = 154065120;
9898
/// let session = Session::new(until, config, report)?;
9999
/// ```
100-
pub fn new(mut until: u64, config: PyroscopeConfig, report: Vec<u8>) -> Result<Self> {
100+
pub fn new(until: u64, config: PyroscopeConfig, report: Vec<u8>) -> Result<Self> {
101101
log::info!(target: LOG_TAG, "Creating Session");
102-
// Session interrupted (0 signal), determine the time
103-
if until == 0 {
104-
let now = std::time::SystemTime::now()
105-
.duration_since(std::time::UNIX_EPOCH)?
106-
.as_secs();
107-
until = now
108-
.checked_add(10u64.checked_sub(now.checked_rem(10).unwrap()).unwrap())
109-
.unwrap();
110-
}
111102

112103
// get_time_range should be used with "from". We balance this by reducing
113104
// 10s from the returned range.

0 commit comments

Comments
 (0)