Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
google
GitHub Repository: google/crosvm
Path: blob/main/base/src/sys/linux/platform_timer_resolution.rs
5394 views
1
// Copyright 2022 The ChromiumOS Authors
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
use crate::EnabledHighResTimer;
6
use crate::Result;
7
8
/// Noop struct on unix.
9
/// On windows, restores the platform timer resolution to its original value on Drop.
10
pub struct UnixSetTimerResolution {}
11
impl EnabledHighResTimer for UnixSetTimerResolution {}
12
13
pub fn enable_high_res_timers() -> Result<Box<dyn EnabledHighResTimer>> {
14
Ok(Box::new(UnixSetTimerResolution {}))
15
}
16
17