Changes in / [bb37870:1031c7e]


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/time

    rbb37870 r1031c7e  
    1010// Created On       : Wed Mar 14 23:18:57 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Apr  3 08:46:08 2018
    13 // Update Count     : 585
     12// Last Modified On : Sun Apr  1 20:03:16 2018
     13// Update Count     : 581
    1414//
    1515
     
    113113
    114114static inline Duration ?%?( Duration lhs, Duration rhs ) { return (Duration)@{ lhs.tv % rhs.tv }; }
    115 static inline Duration ?%=?( Duration & lhs, Duration rhs ) { lhs = lhs % rhs; return lhs; }
    116115
    117116static inline _Bool ?==?( Duration lhs, Duration rhs ) { return lhs.tv == rhs.tv; }
     
    140139static inline Duration ?`m ( int64_t min   ) { return (Duration)@{ min * (60LL * TIMEGRAN) }; }
    141140static inline Duration ?`m ( double  min   ) { return (Duration)@{ min * (60LL * TIMEGRAN) }; }
    142 static inline Duration ?`h ( int64_t hours ) { return (Duration)@{ hours * (60LL * 60LL * TIMEGRAN) }; }
    143 static inline Duration ?`h ( double  hours ) { return (Duration)@{ hours * (60LL * 60LL * TIMEGRAN) }; }
    144 static inline Duration ?`d ( int64_t days  ) { return (Duration)@{ days * (24LL * 60LL * 60LL * TIMEGRAN) }; }
    145 static inline Duration ?`d ( double  days  ) { return (Duration)@{ days * (24LL * 60LL * 60LL * TIMEGRAN) }; }
    146 static inline Duration ?`w ( int64_t weeks ) { return (Duration)@{ weeks * (7LL * 24LL * 60LL * 60LL * TIMEGRAN) }; }
    147 static inline Duration ?`w ( double  weeks ) { return (Duration)@{ weeks * (7LL * 24LL * 60LL * 60LL * TIMEGRAN) }; }
    148 //static inline Duration ?`f ( int64_t fortnight ) { return (Duration)@{ fortnight * (14LL * 24LL * 60LL * 60LL * TIMEGRAN) }; }
    149 //static inline Duration ?`f ( double  fortnight ) { return (Duration)@{ fortnight * (14LL * 24LL * 60LL * 60LL * TIMEGRAN) }; }
     141static inline Duration ?`h ( int64_t hours ) { return (Duration)@{ hours * (3600LL * TIMEGRAN) }; }
     142static inline Duration ?`h ( double  hours ) { return (Duration)@{ hours * (3600LL * TIMEGRAN) }; }
     143static inline Duration ?`d ( int64_t days  ) { return (Duration)@{ days * (24LL * 3600LL * TIMEGRAN) }; }
     144static inline Duration ?`d ( double  days  ) { return (Duration)@{ days * (24LL * 3600LL * TIMEGRAN) }; }
     145static inline Duration ?`w ( int64_t weeks ) { return (Duration)@{ weeks * (7LL * 24LL * 3600LL * TIMEGRAN) }; }
     146//static inline Duration ?`f ( int64_t fortnight ) { return (Duration)@{ fortnight * (14LL * 24LL * 3600LL * TIMEGRAN) }; }
    150147
    151148static inline int64_t ?`ns ( Duration dur ) { return dur.tv; }
     
    154151static inline int64_t ?`s  ( Duration dur ) { return dur.tv / TIMEGRAN; }
    155152static inline int64_t ?`m  ( Duration dur ) { return dur.tv / (60LL * TIMEGRAN); }
    156 static inline int64_t ?`h  ( Duration dur ) { return dur.tv / (60LL * 60LL * TIMEGRAN); }
    157 static inline int64_t ?`d  ( Duration dur ) { return dur.tv / (24LL * 60LL * 60LL * TIMEGRAN); }
    158 static inline int64_t ?`w  ( Duration dur ) { return dur.tv / (7LL * 24LL * 60LL * 60LL * TIMEGRAN); }
    159 static inline int64_t ?`f  ( Duration dur ) { return dur.tv / (14LL * 24LL * 60LL * 60LL * TIMEGRAN); }
     153static inline int64_t ?`h  ( Duration dur ) { return dur.tv / (3600LL * TIMEGRAN); }
     154static inline int64_t ?`d  ( Duration dur ) { return dur.tv / (24LL * 3600LL * TIMEGRAN); }
     155static inline int64_t ?`w  ( Duration dur ) { return dur.tv / (7LL * 24LL * 3600LL * TIMEGRAN); }
     156static inline int64_t ?`f  ( Duration dur ) { return dur.tv / (14LL * 24LL * 3600LL * TIMEGRAN); }
    160157
    161158//------------------------- timeval (cont) -------------------------
Note: See TracChangeset for help on using the changeset viewer.