Changeset bbe1a87 for src/libcfa/time


Ignore:
Timestamp:
Jul 3, 2018, 9:07:31 AM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer
Children:
9459c01, e3b2474
Parents:
4c3ee8d
Message:

use distribution for SC qualifiers, and inline routines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/time

    r4c3ee8d rbbe1a87  
    1010// Created On       : Wed Mar 14 23:18:57 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Apr 14 17:48:23 2018
    13 // Update Count     : 636
     12// Last Modified On : Mon Jul  2 21:28:38 2018
     13// Update Count     : 641
    1414//
    1515
     
    2727enum { TIMEGRAN = 1_000_000_000LL };                                    // nanosecond granularity, except for timeval
    2828
    29 
    3029//######################### Duration #########################
    3130
    32 static inline Duration ?=?( Duration & dur, zero_t ) { return dur{ 0 }; }
    33 
    34 static inline Duration +?( Duration rhs ) with( rhs ) { return (Duration)@{ +tv }; }
    35 static inline Duration ?+?( Duration & lhs, Duration rhs ) { return (Duration)@{ lhs.tv + rhs.tv }; }
    36 static inline Duration ?+=?( Duration & lhs, Duration rhs ) { lhs = lhs + rhs; return lhs; }
    37 
    38 static inline Duration -?( Duration rhs ) with( rhs ) { return (Duration)@{ -tv }; }
    39 static inline Duration ?-?( Duration & lhs, Duration rhs ) { return (Duration)@{ lhs.tv - rhs.tv }; }
    40 static inline Duration ?-=?( Duration & lhs, Duration rhs ) { lhs = lhs - rhs; return lhs; }
    41 
    42 static inline Duration ?*?( Duration lhs, int64_t rhs ) { return (Duration)@{ lhs.tv * rhs }; }
    43 static inline Duration ?*?( int64_t lhs, Duration rhs ) { return (Duration)@{ lhs * rhs.tv }; }
    44 static inline Duration ?*=?( Duration & lhs, int64_t rhs ) { lhs = lhs * rhs; return lhs; }
    45 
    46 static inline int64_t ?/?( Duration lhs, Duration rhs ) { return lhs.tv / rhs.tv; }
    47 static inline Duration ?/?( Duration lhs, int64_t rhs ) { return (Duration)@{ lhs.tv / rhs }; }
    48 static inline Duration ?/=?( Duration & lhs, int64_t rhs ) { lhs = lhs / rhs; return lhs; }
    49 static inline double div( Duration lhs, Duration rhs ) { return (double)lhs.tv / (double)rhs.tv; }
    50 
    51 static inline Duration ?%?( Duration lhs, Duration rhs ) { return (Duration)@{ lhs.tv % rhs.tv }; }
    52 static inline Duration ?%=?( Duration & lhs, Duration rhs ) { lhs = lhs % rhs; return lhs; }
    53 
    54 static inline _Bool ?==?( Duration lhs, Duration rhs ) { return lhs.tv == rhs.tv; }
    55 static inline _Bool ?!=?( Duration lhs, Duration rhs ) { return lhs.tv != rhs.tv; }
    56 static inline _Bool ?<? ( Duration lhs, Duration rhs ) { return lhs.tv <  rhs.tv; }
    57 static inline _Bool ?<=?( Duration lhs, Duration rhs ) { return lhs.tv <= rhs.tv; }
    58 static inline _Bool ?>? ( Duration lhs, Duration rhs ) { return lhs.tv >  rhs.tv; }
    59 static inline _Bool ?>=?( Duration lhs, Duration rhs ) { return lhs.tv >= rhs.tv; }
    60 
    61 static inline _Bool ?==?( Duration lhs, zero_t ) { return lhs.tv == 0; }
    62 static inline _Bool ?!=?( Duration lhs, zero_t ) { return lhs.tv != 0; }
    63 static inline _Bool ?<? ( Duration lhs, zero_t ) { return lhs.tv <  0; }
    64 static inline _Bool ?<=?( Duration lhs, zero_t ) { return lhs.tv <= 0; }
    65 static inline _Bool ?>? ( Duration lhs, zero_t ) { return lhs.tv >  0; }
    66 static inline _Bool ?>=?( Duration lhs, zero_t ) { return lhs.tv >= 0; }
    67 
    68 static inline Duration abs( Duration rhs ) { return rhs.tv >= 0 ? rhs : -rhs; }
    69 
    70 static inline Duration ?`ns( int64_t nsec ) { return (Duration)@{ nsec }; }
    71 static inline Duration ?`us( int64_t usec ) { return (Duration)@{ usec * (TIMEGRAN / 1_000_000LL) }; }
    72 static inline Duration ?`ms( int64_t msec ) { return (Duration)@{ msec * (TIMEGRAN / 1_000LL) }; }
    73 static inline Duration ?`s( int64_t sec ) { return (Duration)@{ sec * TIMEGRAN }; }
    74 static inline Duration ?`s( double sec ) { return (Duration)@{ sec * TIMEGRAN }; }
    75 static inline Duration ?`m( int64_t min ) { return (Duration)@{ min * (60LL * TIMEGRAN) }; }
    76 static inline Duration ?`m( double min ) { return (Duration)@{ min * (60LL * TIMEGRAN) }; }
    77 static inline Duration ?`h( int64_t hours ) { return (Duration)@{ hours * (60LL * 60LL * TIMEGRAN) }; }
    78 static inline Duration ?`h( double hours ) { return (Duration)@{ hours * (60LL * 60LL * TIMEGRAN) }; }
    79 static inline Duration ?`d( int64_t days ) { return (Duration)@{ days * (24LL * 60LL * 60LL * TIMEGRAN) }; }
    80 static inline Duration ?`d( double days ) { return (Duration)@{ days * (24LL * 60LL * 60LL * TIMEGRAN) }; }
    81 static inline Duration ?`w( int64_t weeks ) { return (Duration)@{ weeks * (7LL * 24LL * 60LL * 60LL * TIMEGRAN) }; }
    82 static inline Duration ?`w( double weeks ) { return (Duration)@{ weeks * (7LL * 24LL * 60LL * 60LL * TIMEGRAN) }; }
    83 
    84 static inline int64_t ?`ns( Duration dur ) { return dur.tv; }
    85 static inline int64_t ?`us( Duration dur ) { return dur.tv / (TIMEGRAN / 1_000_000LL); }
    86 static inline int64_t ?`ms( Duration dur ) { return dur.tv / (TIMEGRAN / 1_000LL); }
    87 static inline int64_t ?`s( Duration dur ) { return dur.tv / TIMEGRAN; }
    88 static inline int64_t ?`m( Duration dur ) { return dur.tv / (60LL * TIMEGRAN); }
    89 static inline int64_t ?`h( Duration dur ) { return dur.tv / (60LL * 60LL * TIMEGRAN); }
    90 static inline int64_t ?`d( Duration dur ) { return dur.tv / (24LL * 60LL * 60LL * TIMEGRAN); }
    91 static inline int64_t ?`w( Duration dur ) { return dur.tv / (7LL * 24LL * 60LL * 60LL * TIMEGRAN); }
    92 
    93 static inline Duration max( Duration lhs, Duration rhs ) { return  (lhs.tv < rhs.tv) ? rhs : lhs;}
    94 static inline Duration min( Duration lhs, Duration rhs ) { return !(rhs.tv < lhs.tv) ? lhs : rhs;}
    95 
     31static inline {
     32        Duration ?=?( Duration & dur, zero_t ) { return dur{ 0 }; }
     33
     34        Duration +?( Duration rhs ) with( rhs ) {       return (Duration)@{ +tv }; }
     35        Duration ?+?( Duration & lhs, Duration rhs ) { return (Duration)@{ lhs.tv + rhs.tv }; }
     36        Duration ?+=?( Duration & lhs, Duration rhs ) { lhs = lhs + rhs; return lhs; }
     37
     38        Duration -?( Duration rhs ) with( rhs ) { return (Duration)@{ -tv }; }
     39        Duration ?-?( Duration & lhs, Duration rhs ) { return (Duration)@{ lhs.tv - rhs.tv }; }
     40        Duration ?-=?( Duration & lhs, Duration rhs ) { lhs = lhs - rhs; return lhs; }
     41
     42        Duration ?*?( Duration lhs, int64_t rhs ) { return (Duration)@{ lhs.tv * rhs }; }
     43        Duration ?*?( int64_t lhs, Duration rhs ) { return (Duration)@{ lhs * rhs.tv }; }
     44        Duration ?*=?( Duration & lhs, int64_t rhs ) { lhs = lhs * rhs; return lhs; }
     45
     46        int64_t ?/?( Duration lhs, Duration rhs ) { return lhs.tv / rhs.tv; }
     47        Duration ?/?( Duration lhs, int64_t rhs ) { return (Duration)@{ lhs.tv / rhs }; }
     48        Duration ?/=?( Duration & lhs, int64_t rhs ) { lhs = lhs / rhs; return lhs; }
     49        double div( Duration lhs, Duration rhs ) { return (double)lhs.tv / (double)rhs.tv; }
     50
     51        Duration ?%?( Duration lhs, Duration rhs ) { return (Duration)@{ lhs.tv % rhs.tv }; }
     52        Duration ?%=?( Duration & lhs, Duration rhs ) { lhs = lhs % rhs; return lhs; }
     53
     54        _Bool ?==?( Duration lhs, Duration rhs ) { return lhs.tv == rhs.tv; }
     55        _Bool ?!=?( Duration lhs, Duration rhs ) { return lhs.tv != rhs.tv; }
     56        _Bool ?<? ( Duration lhs, Duration rhs ) { return lhs.tv <  rhs.tv; }
     57        _Bool ?<=?( Duration lhs, Duration rhs ) { return lhs.tv <= rhs.tv; }
     58        _Bool ?>? ( Duration lhs, Duration rhs ) { return lhs.tv >  rhs.tv; }
     59        _Bool ?>=?( Duration lhs, Duration rhs ) { return lhs.tv >= rhs.tv; }
     60
     61        _Bool ?==?( Duration lhs, zero_t ) { return lhs.tv == 0; }
     62        _Bool ?!=?( Duration lhs, zero_t ) { return lhs.tv != 0; }
     63        _Bool ?<? ( Duration lhs, zero_t ) { return lhs.tv <  0; }
     64        _Bool ?<=?( Duration lhs, zero_t ) { return lhs.tv <= 0; }
     65        _Bool ?>? ( Duration lhs, zero_t ) { return lhs.tv >  0; }
     66        _Bool ?>=?( Duration lhs, zero_t ) { return lhs.tv >= 0; }
     67
     68        Duration abs( Duration rhs ) { return rhs.tv >= 0 ? rhs : -rhs; }
     69
     70        Duration ?`ns( int64_t nsec ) { return (Duration)@{ nsec }; }
     71        Duration ?`us( int64_t usec ) { return (Duration)@{ usec * (TIMEGRAN / 1_000_000LL) }; }
     72        Duration ?`ms( int64_t msec ) { return (Duration)@{ msec * (TIMEGRAN / 1_000LL) }; }
     73        Duration ?`s( int64_t sec ) { return (Duration)@{ sec * TIMEGRAN }; }
     74        Duration ?`s( double sec ) { return (Duration)@{ sec * TIMEGRAN }; }
     75        Duration ?`m( int64_t min ) { return (Duration)@{ min * (60LL * TIMEGRAN) }; }
     76        Duration ?`m( double min ) { return (Duration)@{ min * (60LL * TIMEGRAN) }; }
     77        Duration ?`h( int64_t hours ) { return (Duration)@{ hours * (60LL * 60LL * TIMEGRAN) }; }
     78        Duration ?`h( double hours ) { return (Duration)@{ hours * (60LL * 60LL * TIMEGRAN) }; }
     79        Duration ?`d( int64_t days ) { return (Duration)@{ days * (24LL * 60LL * 60LL * TIMEGRAN) }; }
     80        Duration ?`d( double days ) { return (Duration)@{ days * (24LL * 60LL * 60LL * TIMEGRAN) }; }
     81        Duration ?`w( int64_t weeks ) { return (Duration)@{ weeks * (7LL * 24LL * 60LL * 60LL * TIMEGRAN) }; }
     82        Duration ?`w( double weeks ) { return (Duration)@{ weeks * (7LL * 24LL * 60LL * 60LL * TIMEGRAN) }; }
     83
     84        int64_t ?`ns( Duration dur ) { return dur.tv; }
     85        int64_t ?`us( Duration dur ) { return dur.tv / (TIMEGRAN / 1_000_000LL); }
     86        int64_t ?`ms( Duration dur ) { return dur.tv / (TIMEGRAN / 1_000LL); }
     87        int64_t ?`s( Duration dur ) { return dur.tv / TIMEGRAN; }
     88        int64_t ?`m( Duration dur ) { return dur.tv / (60LL * TIMEGRAN); }
     89        int64_t ?`h( Duration dur ) { return dur.tv / (60LL * 60LL * TIMEGRAN); }
     90        int64_t ?`d( Duration dur ) { return dur.tv / (24LL * 60LL * 60LL * TIMEGRAN); }
     91        int64_t ?`w( Duration dur ) { return dur.tv / (7LL * 24LL * 60LL * 60LL * TIMEGRAN); }
     92
     93        Duration max( Duration lhs, Duration rhs ) { return  (lhs.tv < rhs.tv) ? rhs : lhs;}
     94        Duration min( Duration lhs, Duration rhs ) { return !(rhs.tv < lhs.tv) ? lhs : rhs;}
     95} // distribution
    9696
    9797//######################### C timeval #########################
    9898
    99 static inline void ?{}( timeval & t ) {}
    100 static inline void ?{}( timeval & t, time_t sec, suseconds_t usec ) { t.tv_sec = sec; t.tv_usec = usec; }
    101 static inline void ?{}( timeval & t, time_t sec ) { t{ sec, 0 }; }
    102 static inline void ?{}( timeval & t, zero_t ) { t{ 0, 0 }; }
    103 static inline timeval ?=?( timeval & t, zero_t ) { return t{ 0 }; }
    104 static inline timeval ?+?( timeval & lhs, timeval rhs ) { return (timeval)@{ lhs.tv_sec + rhs.tv_sec, lhs.tv_usec + rhs.tv_usec }; }
    105 static inline timeval ?-?( timeval & lhs, timeval rhs ) { return (timeval)@{ lhs.tv_sec - rhs.tv_sec, lhs.tv_usec - rhs.tv_usec }; }
    106 static inline _Bool ?==?( timeval lhs, timeval rhs ) { return lhs.tv_sec == rhs.tv_sec && lhs.tv_usec == rhs.tv_usec; }
    107 static inline _Bool ?!=?( timeval lhs, timeval rhs ) { return lhs.tv_sec != rhs.tv_sec || lhs.tv_usec != rhs.tv_usec; }
    108 
     99static inline {
     100        void ?{}( timeval & t ) {}
     101        void ?{}( timeval & t, time_t sec, suseconds_t usec ) { t.tv_sec = sec; t.tv_usec = usec; }
     102        void ?{}( timeval & t, time_t sec ) { t{ sec, 0 }; }
     103        void ?{}( timeval & t, zero_t ) { t{ 0, 0 }; }
     104
     105        timeval ?=?( timeval & t, zero_t ) { return t{ 0 }; }
     106        timeval ?+?( timeval & lhs, timeval rhs ) { return (timeval)@{ lhs.tv_sec + rhs.tv_sec, lhs.tv_usec + rhs.tv_usec }; }
     107        timeval ?-?( timeval & lhs, timeval rhs ) { return (timeval)@{ lhs.tv_sec - rhs.tv_sec, lhs.tv_usec - rhs.tv_usec }; }
     108        _Bool ?==?( timeval lhs, timeval rhs ) { return lhs.tv_sec == rhs.tv_sec && lhs.tv_usec == rhs.tv_usec; }
     109        _Bool ?!=?( timeval lhs, timeval rhs ) { return lhs.tv_sec != rhs.tv_sec || lhs.tv_usec != rhs.tv_usec; }
     110} // distribution
    109111
    110112//######################### C timespec #########################
    111113
    112 static inline void ?{}( timespec & t ) {}
    113 static inline void ?{}( timespec & t, time_t sec, __syscall_slong_t nsec ) { t.tv_sec = sec; t.tv_nsec = nsec; }
    114 static inline void ?{}( timespec & t, time_t sec ) { t{ sec, 0}; }
    115 static inline void ?{}( timespec & t, zero_t ) { t{ 0, 0 }; }
    116 static inline timespec ?=?( timespec & t, zero_t ) { return t{ 0 }; }
    117 static inline timespec ?+?( timespec & lhs, timespec rhs ) { return (timespec)@{ lhs.tv_sec + rhs.tv_sec, lhs.tv_nsec + rhs.tv_nsec }; }
    118 static inline timespec ?-?( timespec & lhs, timespec rhs ) { return (timespec)@{ lhs.tv_sec - rhs.tv_sec, lhs.tv_nsec - rhs.tv_nsec }; }
    119 static inline _Bool ?==?( timespec lhs, timespec rhs ) { return lhs.tv_sec == rhs.tv_sec && lhs.tv_nsec == rhs.tv_nsec; }
    120 static inline _Bool ?!=?( timespec lhs, timespec rhs ) { return lhs.tv_sec != rhs.tv_sec || lhs.tv_nsec != rhs.tv_nsec; }
    121 
     114static inline {
     115        void ?{}( timespec & t ) {}
     116        void ?{}( timespec & t, time_t sec, __syscall_slong_t nsec ) { t.tv_sec = sec; t.tv_nsec = nsec; }
     117        void ?{}( timespec & t, time_t sec ) { t{ sec, 0}; }
     118        void ?{}( timespec & t, zero_t ) { t{ 0, 0 }; }
     119
     120        timespec ?=?( timespec & t, zero_t ) { return t{ 0 }; }
     121        timespec ?+?( timespec & lhs, timespec rhs ) { return (timespec)@{ lhs.tv_sec + rhs.tv_sec, lhs.tv_nsec + rhs.tv_nsec }; }
     122        timespec ?-?( timespec & lhs, timespec rhs ) { return (timespec)@{ lhs.tv_sec - rhs.tv_sec, lhs.tv_nsec - rhs.tv_nsec }; }
     123        _Bool ?==?( timespec lhs, timespec rhs ) { return lhs.tv_sec == rhs.tv_sec && lhs.tv_nsec == rhs.tv_nsec; }
     124        _Bool ?!=?( timespec lhs, timespec rhs ) { return lhs.tv_sec != rhs.tv_sec || lhs.tv_nsec != rhs.tv_nsec; }
     125} // distribution
    122126
    123127//######################### C itimerval #########################
    124128
    125 static inline void ?{}( itimerval & itv, Duration alarm ) with( itv ) {
    126         // itimerval contains durations but but uses time data-structure timeval.
    127         it_value{ alarm`s, (alarm % 1`s)`us };                          // seconds, microseconds
    128         it_interval{ 0 };                                                                       // 0 seconds, 0 microseconds
    129 } // itimerval
    130 
    131 static inline void ?{}( itimerval & itv, Duration alarm, Duration interval ) with( itv ) {
    132         // itimerval contains durations but but uses time data-structure timeval.
    133         it_value{ alarm`s, (alarm % 1`s)`us };                          // seconds, microseconds
    134         it_interval{ interval`s, interval`us };                         // seconds, microseconds
    135 } // itimerval
    136 
     129static inline {
     130        void ?{}( itimerval & itv, Duration alarm ) with( itv ) {
     131                // itimerval contains durations but but uses time data-structure timeval.
     132                it_value{ alarm`s, (alarm % 1`s)`us };                  // seconds, microseconds
     133                it_interval{ 0 };                                                               // 0 seconds, 0 microseconds
     134        } // itimerval
     135
     136        void ?{}( itimerval & itv, Duration alarm, Duration interval ) with( itv ) {
     137                // itimerval contains durations but but uses time data-structure timeval.
     138                it_value{ alarm`s, (alarm % 1`s)`us };                  // seconds, microseconds
     139                it_interval{ interval`s, interval`us };                 // seconds, microseconds
     140        } // itimerval
     141} // distribution
    137142
    138143//######################### Time #########################
    139144
    140145void ?{}( Time & time, int year, int month = 0, int day = 0, int hour = 0, int min = 0, int sec = 0, int nsec = 0 );
    141 static inline Time ?=?( Time & time, zero_t ) { return time{ 0 }; }
    142 
    143 static inline void ?{}( Time & time, timeval t ) with( time ) { tv = (int64_t)t.tv_sec * TIMEGRAN + t.tv_usec * 1000; }
    144 static inline Time ?=?( Time & time, timeval t ) with( time ) {
    145         tv = (int64_t)t.tv_sec * TIMEGRAN + t.tv_usec * (TIMEGRAN / 1_000_000LL);
    146         return time;
    147 } // ?=?
    148 
    149 static inline void ?{}( Time & time, timespec t ) with( time ) { tv = (int64_t)t.tv_sec * TIMEGRAN + t.tv_nsec; }
    150 static inline Time ?=?( Time & time, timespec t ) with( time ) {
    151         tv = (int64_t)t.tv_sec * TIMEGRAN + t.tv_nsec;
    152         return time;
    153 } // ?=?
    154 
    155 static inline Time ?+?( Time & lhs, Duration rhs ) { return (Time)@{ lhs.tv + rhs.tv }; }
    156 static inline Time ?+?( Duration lhs, Time rhs ) { return rhs + lhs; }
    157 static inline Time ?+=?( Time & lhs, Duration rhs ) { lhs = lhs + rhs; return lhs; }
    158 
    159 static inline Duration ?-?( Time lhs, Time rhs ) { return (Duration)@{ lhs.tv - rhs.tv }; }
    160 static inline Time ?-?( Time lhs, Duration rhs ) { return (Time)@{ lhs.tv - rhs.tv }; }
    161 static inline Time ?-=?( Time & lhs, Duration rhs ) { lhs = lhs - rhs; return lhs; }
    162 static inline _Bool ?==?( Time lhs, Time rhs ) { return lhs.tv == rhs.tv; }
    163 static inline _Bool ?!=?( Time lhs, Time rhs ) { return lhs.tv != rhs.tv; }
    164 static inline _Bool ?<?( Time lhs, Time rhs ) { return lhs.tv < rhs.tv; }
    165 static inline _Bool ?<=?( Time lhs, Time rhs ) { return lhs.tv <= rhs.tv; }
    166 static inline _Bool ?>?( Time lhs, Time rhs ) { return lhs.tv > rhs.tv; }
    167 static inline _Bool ?>=?( Time lhs, Time rhs ) { return lhs.tv >= rhs.tv; }
     146static inline {
     147        Time ?=?( Time & time, zero_t ) { return time{ 0 }; }
     148
     149        void ?{}( Time & time, timeval t ) with( time ) { tv = (int64_t)t.tv_sec * TIMEGRAN + t.tv_usec * 1000; }
     150        Time ?=?( Time & time, timeval t ) with( time ) {
     151                tv = (int64_t)t.tv_sec * TIMEGRAN + t.tv_usec * (TIMEGRAN / 1_000_000LL);
     152                return time;
     153        } // ?=?
     154
     155        void ?{}( Time & time, timespec t ) with( time ) { tv = (int64_t)t.tv_sec * TIMEGRAN + t.tv_nsec; }
     156        Time ?=?( Time & time, timespec t ) with( time ) {
     157                tv = (int64_t)t.tv_sec * TIMEGRAN + t.tv_nsec;
     158                return time;
     159        } // ?=?
     160
     161        Time ?+?( Time & lhs, Duration rhs ) { return (Time)@{ lhs.tv + rhs.tv }; }
     162        Time ?+?( Duration lhs, Time rhs ) { return rhs + lhs; }
     163        Time ?+=?( Time & lhs, Duration rhs ) { lhs = lhs + rhs; return lhs; }
     164
     165        Duration ?-?( Time lhs, Time rhs ) { return (Duration)@{ lhs.tv - rhs.tv }; }
     166        Time ?-?( Time lhs, Duration rhs ) { return (Time)@{ lhs.tv - rhs.tv }; }
     167        Time ?-=?( Time & lhs, Duration rhs ) { lhs = lhs - rhs; return lhs; }
     168        _Bool ?==?( Time lhs, Time rhs ) { return lhs.tv == rhs.tv; }
     169        _Bool ?!=?( Time lhs, Time rhs ) { return lhs.tv != rhs.tv; }
     170        _Bool ?<?( Time lhs, Time rhs ) { return lhs.tv < rhs.tv; }
     171        _Bool ?<=?( Time lhs, Time rhs ) { return lhs.tv <= rhs.tv; }
     172        _Bool ?>?( Time lhs, Time rhs ) { return lhs.tv > rhs.tv; }
     173        _Bool ?>=?( Time lhs, Time rhs ) { return lhs.tv >= rhs.tv; }
     174} // distribution
    168175
    169176char * yy_mm_dd( Time time, char * buf );
Note: See TracChangeset for help on using the changeset viewer.