update clock to time calc

This commit is contained in:
Alwin Berger 2022-05-04 21:11:39 +02:00
parent 865e97cca7
commit 18a592d763

View File

@ -145,7 +145,6 @@ impl Default for QemuClockObserver {
//========== Feedback
/// Nop feedback that annotates execution time in the new testcase, if any
/// for this Feedback, the testcase is never interesting (use with an OR)
/// It decides, if the given [`ClockObserver`] value of a run is interesting.
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct ClockFeedback {
exec_time: Option<u64>,
@ -179,7 +178,7 @@ where
#[inline]
fn append_metadata(&mut self, _state: &mut S, testcase: &mut Testcase<I>) -> Result<(), Error> {
*testcase.exec_time_mut() = match self.exec_time {
Some(s) => Some(Duration::new(0,360*s as u32)),
Some(s) => Some(Duration::from_nanos(s << 3)), //emulated time is << 3, real time more like * 360
None => None,
};
self.exec_time = None;