Changeset 25cdca5 for libcfa/src/time.cfa
- Timestamp:
- Jan 8, 2019, 11:31:21 AM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 08222c7, 274da98
- Parents:
- 84b4d607 (diff), d5b2ac8 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/time.cfa
r84b4d607 r25cdca5 10 10 // Created On : Tue Mar 27 13:33:14 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Dec 11 21:32:15201813 // Update Count : 5 312 // Last Modified On : Sun Dec 23 22:57:48 2018 13 // Update Count : 57 14 14 // 15 15 … … 33 33 forall( dtype ostype | ostream( ostype ) ) { 34 34 ostype & ?|?( ostype & os, Duration dur ) with( dur ) { 35 (ostype )(os | tv / TIMEGRAN); // print seconds35 (ostype &)(os | tv / TIMEGRAN); // print seconds 36 36 long int ns = (tv < 0 ? -tv : tv) % TIMEGRAN; // compute nanoseconds 37 37 if ( ns != 0 ) { // some ? 38 38 char buf[16]; 39 (ostype )(os | nanomsd( ns, buf )); // print nanoseconds39 (ostype &)(os | nanomsd( ns, buf )); // print nanoseconds 40 40 } // if 41 41 return os; … … 43 43 44 44 void ?|?( ostype & os, Duration dur ) with( dur ) { 45 (ostype )(os | dur); if ( getANL( os ) )nl( os );45 (ostype &)(os | dur); nl( os ); 46 46 } // ?|? 47 47 } // distribution … … 150 150 long int ns = (tv < 0 ? -tv : tv) % TIMEGRAN; // compute nanoseconds 151 151 if ( ns == 0 ) { // none ? 152 (ostype )(os | buf); // print date/time/year152 (ostype &)(os | buf); // print date/time/year 153 153 } else { 154 154 buf[19] = '\0'; // truncate to "Wed Jun 30 21:49:08" 155 155 char buf2[16]; 156 156 nanomsd( ns, buf2 ); // compute nanoseconds 157 (ostype )(os | buf | buf2 | ' ' | &buf[20]); // print date/time, nanoseconds and year157 (ostype &)(os | buf | buf2 | ' ' | &buf[20]); // print date/time, nanoseconds and year 158 158 } // if 159 159 return os; … … 161 161 162 162 void ?|?( ostype & os, Time time ) with( time ) { 163 (ostype )(os | time); if ( getANL( os ) )nl( os );163 (ostype &)(os | time); nl( os ); 164 164 } // ?|? 165 165 } // distribution
Note: See TracChangeset
for help on using the changeset viewer.