Changeset 2ae16219 for src/libcfa/time


Ignore:
Timestamp:
Apr 19, 2018, 11:04:47 AM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
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, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
Children:
c28bcc7
Parents:
b2da0574 (diff), 61323a7 (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:/u/cforall/software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/time

    rb2da0574 r2ae16219  
    1010// Created On       : Wed Mar 14 23:18:57 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Apr 13 07:51:52 2018
    13 // Update Count     : 634
     12// Last Modified On : Sat Apr 14 17:48:23 2018
     13// Update Count     : 636
    1414//
    1515
     
    2929
    3030//######################### Duration #########################
    31 
    32 static inline void ?{}( Duration & dur, Duration d ) with( dur ) { tv = d.tv; }
    3331
    3432static inline Duration ?=?( Duration & dur, zero_t ) { return dur{ 0 }; }
     
    137135//######################### Time #########################
    138136
    139 static inline void ?{}( Time & time, Time t ) with( time ) { tv = t.tv; }
    140137void ?{}( Time & time, int year, int month = 0, int day = 0, int hour = 0, int min = 0, int sec = 0, int nsec = 0 );
     138static inline Time ?=?( Time & time, zero_t ) { return time{ 0 }; }
     139
    141140static inline void ?{}( Time & time, timeval t ) with( time ) { tv = (int64_t)t.tv_sec * TIMEGRAN + t.tv_usec * 1000; }
    142 
    143 static inline Time ?=?( Time & time, zero_t ) { return time{ 0 }; }
    144 
    145141static inline Time ?=?( Time & time, timeval t ) with( time ) {
    146142        tv = (int64_t)t.tv_sec * TIMEGRAN + t.tv_usec * (TIMEGRAN / 1_000_000LL);
     
    148144} // ?=?
    149145
    150 static inline void ?{}( Time & time, timespec t ) with( time ) {
    151         tv = (int64_t)t.tv_sec * TIMEGRAN + t.tv_nsec;
    152 } // Time
    153 
     146static inline void ?{}( Time & time, timespec t ) with( time ) { tv = (int64_t)t.tv_sec * TIMEGRAN + t.tv_nsec; }
    154147static inline Time ?=?( Time & time, timespec t ) with( time ) {
    155148        tv = (int64_t)t.tv_sec * TIMEGRAN + t.tv_nsec;
Note: See TracChangeset for help on using the changeset viewer.