Changes in libcfa/src/time.hfa [030653a:89c2a77b]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/time.hfa
r030653a r89c2a77b 10 10 // Created On : Wed Mar 14 23:18:57 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 17 16:13:00 202013 // Update Count : 66 312 // Last Modified On : Wed Apr 14 09:30:30 2021 13 // Update Count : 664 14 14 // 15 15 … … 29 29 static inline { 30 30 Duration ?=?( Duration & dur, __attribute__((unused)) zero_t ) { return dur{ 0 }; } 31 32 void ?{}( Duration & dur, timeval t ) with( dur ) { tn = (int64_t)t.tv_sec * TIMEGRAN + t.tv_usec * 1000; } 33 Duration ?=?( Duration & dur, timeval t ) with( dur ) { 34 tn = (int64_t)t.tv_sec * TIMEGRAN + t.tv_usec * (TIMEGRAN / 1_000_000LL); 35 return dur; 36 } // ?=? 37 38 void ?{}( Duration & dur, timespec t ) with( dur ) { tn = (int64_t)t.tv_sec * TIMEGRAN + t.tv_nsec; } 39 Duration ?=?( Duration & dur, timespec t ) with( dur ) { 40 tn = (int64_t)t.tv_sec * TIMEGRAN + t.tv_nsec; 41 return dur; 42 } // ?=? 31 43 32 44 Duration +?( Duration rhs ) with( rhs ) { return (Duration)@{ +tn }; }
Note: See TracChangeset
for help on using the changeset viewer.