summaryrefslogtreecommitdiff
path: root/src/sys/time.rs
diff options
context:
space:
mode:
authorSteveLauC <stevelauc@outlook.com>2022-08-09 12:17:27 +0800
committerSteveLauC <stevelauc@outlook.com>2022-08-09 12:17:27 +0800
commit347915bdb590d9b3437b9c5c69c6f1652017d325 (patch)
tree4a309e5a56e5e1443a4e01129dd7dd082e2601a7 /src/sys/time.rs
parentd458ecd4e1205d36230ecac85c67472e3227a92d (diff)
downloadnix-347915bdb590d9b3437b9c5c69c6f1652017d325.zip
format code
Diffstat (limited to 'src/sys/time.rs')
-rw-r--r--src/sys/time.rs50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/sys/time.rs b/src/sys/time.rs
index 36279978..e7a72f02 100644
--- a/src/sys/time.rs
+++ b/src/sys/time.rs
@@ -7,17 +7,17 @@ use std::time::Duration;
use std::{cmp, fmt, ops};
#[cfg(any(
-all(feature = "time", any(target_os = "android", target_os = "linux")),
-all(
-any(
-target_os = "freebsd",
-target_os = "illumos",
-target_os = "linux",
-target_os = "netbsd"
-),
-feature = "time",
-feature = "signal"
-)
+ all(feature = "time", any(target_os = "android", target_os = "linux")),
+ all(
+ any(
+ target_os = "freebsd",
+ target_os = "illumos",
+ target_os = "linux",
+ target_os = "netbsd"
+ ),
+ feature = "time",
+ feature = "signal"
+ )
))]
pub(crate) mod timer {
use crate::sys::time::TimeSpec;
@@ -98,10 +98,10 @@ pub(crate) mod timer {
}
}
#[cfg(any(
- target_os = "freebsd",
- target_os = "netbsd",
- target_os = "dragonfly",
- target_os = "illumos"
+ target_os = "freebsd",
+ target_os = "netbsd",
+ target_os = "dragonfly",
+ target_os = "illumos"
))]
bitflags! {
/// Flags that are used for arming the timer.
@@ -114,17 +114,17 @@ pub(crate) mod timer {
fn from(timerspec: TimerSpec) -> Expiration {
match timerspec {
TimerSpec(libc::itimerspec {
- it_interval:
- libc::timespec {
- tv_sec: 0,
- tv_nsec: 0,
- },
- it_value: ts,
- }) => Expiration::OneShot(ts.into()),
+ it_interval:
+ libc::timespec {
+ tv_sec: 0,
+ tv_nsec: 0,
+ },
+ it_value: ts,
+ }) => Expiration::OneShot(ts.into()),
TimerSpec(libc::itimerspec {
- it_interval: int_ts,
- it_value: val_ts,
- }) => {
+ it_interval: int_ts,
+ it_value: val_ts,
+ }) => {
if (int_ts.tv_sec == val_ts.tv_sec)
&& (int_ts.tv_nsec == val_ts.tv_nsec)
{