Lines Matching refs:seconds
11 Self::seconds(0) in zero()
18 Self::seconds(secs) in hours()
25 Self::seconds(secs) in minutes()
28 fn seconds(seconds: i64) -> Self; in seconds() method
126 fn seconds(seconds: i64) -> TimeSpec { in seconds() method
127 assert!(seconds >= TS_MIN_SECONDS && seconds <= TS_MAX_SECONDS, in seconds()
128 "TimeSpec out of bounds; seconds={}", seconds); in seconds()
130 TimeSpec(timespec {tv_sec: seconds as time_t, tv_nsec: 0 }) in seconds()
327 fn seconds(seconds: i64) -> TimeVal { in seconds() method
328 assert!(seconds >= TV_MIN_SECONDS && seconds <= TV_MAX_SECONDS, in seconds()
329 "TimeVal out of bounds; seconds={}", seconds); in seconds()
331 TimeVal(timeval {tv_sec: seconds as time_t, tv_usec: 0 }) in seconds()
523 assert!(TimeSpec::seconds(1) != TimeSpec::zero()); in test_timespec()
524 assert_eq!(TimeSpec::seconds(1) + TimeSpec::seconds(2), in test_timespec()
525 TimeSpec::seconds(3)); in test_timespec()
526 assert_eq!(TimeSpec::minutes(3) + TimeSpec::seconds(2), in test_timespec()
527 TimeSpec::seconds(182)); in test_timespec()
541 let a = TimeSpec::seconds(1) + TimeSpec::nanoseconds(123); in test_timespec_neg()
542 let b = TimeSpec::seconds(-1) + TimeSpec::nanoseconds(-123); in test_timespec_neg()
549 assert!(TimeSpec::seconds(1) == TimeSpec::nanoseconds(1_000_000_000)); in test_timespec_ord()
550 assert!(TimeSpec::seconds(1) < TimeSpec::nanoseconds(1_000_000_001)); in test_timespec_ord()
551 assert!(TimeSpec::seconds(1) > TimeSpec::nanoseconds(999_999_999)); in test_timespec_ord()
552 assert!(TimeSpec::seconds(-1) < TimeSpec::nanoseconds(-999_999_999)); in test_timespec_ord()
553 assert!(TimeSpec::seconds(-1) > TimeSpec::nanoseconds(-1_000_000_001)); in test_timespec_ord()
559 assert_eq!(TimeSpec::seconds(42).to_string(), "42 seconds"); in test_timespec_fmt()
563 assert_eq!(TimeSpec::seconds(-86401).to_string(), "-86401 seconds"); in test_timespec_fmt()
568 assert!(TimeVal::seconds(1) != TimeVal::zero()); in test_timeval()
569 assert_eq!(TimeVal::seconds(1) + TimeVal::seconds(2), in test_timeval()
570 TimeVal::seconds(3)); in test_timeval()
571 assert_eq!(TimeVal::minutes(3) + TimeVal::seconds(2), in test_timeval()
572 TimeVal::seconds(182)); in test_timeval()
577 assert!(TimeVal::seconds(1) == TimeVal::microseconds(1_000_000)); in test_timeval_ord()
578 assert!(TimeVal::seconds(1) < TimeVal::microseconds(1_000_001)); in test_timeval_ord()
579 assert!(TimeVal::seconds(1) > TimeVal::microseconds(999_999)); in test_timeval_ord()
580 assert!(TimeVal::seconds(-1) < TimeVal::microseconds(-999_999)); in test_timeval_ord()
581 assert!(TimeVal::seconds(-1) > TimeVal::microseconds(-1_000_001)); in test_timeval_ord()
586 let a = TimeVal::seconds(1) + TimeVal::microseconds(123); in test_timeval_neg()
587 let b = TimeVal::seconds(-1) + TimeVal::microseconds(-123); in test_timeval_neg()
595 assert_eq!(TimeVal::seconds(42).to_string(), "42 seconds"); in test_timeval_fmt()
599 assert_eq!(TimeVal::seconds(-86401).to_string(), "-86401 seconds"); in test_timeval_fmt()