Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/rust/zeitstempel/src/   (Firefox Browser Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  win.rs

  Sprache: Rust
 

//! Timestamp implementation for Windows 10+ or Windows Server 2016+.
//!
//! Lower versions don't have the necessary API and should use the fallback.

#![cfg(feature = "win10plus")]

/// [PULONGLONG] is a pointer to [ULONGLONG], a 64-bit unsigned integer.
///
/// [PULONGLONG]: https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types#PULONGLONG
/// [ULONGLONG]: https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types#ulonglong
type PULONGLONG = *mut u64;

/// Link against Windows' `mincore`.
#[link(name = "mincore")]
extern "system" {
    /// Gets the current interrupt-time count.
    ///
    /// See [`QueryInterruptTime`].
    ///
    /// [`QueryInterruptTime`]: https://docs.microsoft.com/en-us/windows/win32/api/realtimeapiset/nf-realtimeapiset-queryinterrupttime
    ///
    /// Note: we define it ourselves, because it's not actually included in `winapi`.
    fn QueryInterruptTime(InterruptTime: PULONGLONG);
}

/// Windows counts time in a system time unit of 100 nanoseconds.
const SYSTEM_TIME_UNIT: u64 = 100;

/// The time based on the current interrupt-time count.
/// This includes the suspend time.
///
/// See [`QueryInterruptTime`].
///
/// [`QueryInterruptTime`]: https://docs.microsoft.com/en-us/windows/win32/api/realtimeapiset/nf-realtimeapiset-queryinterrupttime
pub fn now_including_suspend() -> u64 {
    let mut interrupt_time = 0;
    unsafe {
        QueryInterruptTime(&mut interrupt_time);
    }

    interrupt_time * SYSTEM_TIME_UNIT
}

Messung V0.5 in Prozent
C=48 H=82 G=67

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet am  2026-06-20) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.