Ignore:
Timestamp:
Aug 14, 2018, 1:20:59 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, 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, pthread-emulation, qualifiedEnum
Children:
7b3a6e6
Parents:
0c827019 (diff), 26f4dbe (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/time.hfa

    r0c827019 r0e0f128c  
    1010// Created On       : Wed Mar 14 23:18:57 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jul  2 21:28:38 2018
    13 // Update Count     : 641
     12// Last Modified On : Sat Aug 11 13:55:33 2018
     13// Update Count     : 642
    1414//
    1515
     
    5252        Duration ?%=?( Duration & lhs, Duration rhs ) { lhs = lhs % rhs; return lhs; }
    5353
    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; }
     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; }
    6767
    6868        Duration abs( Duration rhs ) { return rhs.tv >= 0 ? rhs : -rhs; }
     
    106106        timeval ?+?( timeval & lhs, timeval rhs ) { return (timeval)@{ lhs.tv_sec + rhs.tv_sec, lhs.tv_usec + rhs.tv_usec }; }
    107107        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; }
     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; }
    110110} // distribution
    111111
     
    121121        timespec ?+?( timespec & lhs, timespec rhs ) { return (timespec)@{ lhs.tv_sec + rhs.tv_sec, lhs.tv_nsec + rhs.tv_nsec }; }
    122122        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; }
     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; }
    125125} // distribution
    126126
     
    166166        Time ?-?( Time lhs, Duration rhs ) { return (Time)@{ lhs.tv - rhs.tv }; }
    167167        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; }
     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; }
    174174} // distribution
    175175
Note: See TracChangeset for help on using the changeset viewer.