ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since a254fa56 was
e0c235c,
checked in by Peter A. Buhr <pabuhr@…>, 5 years ago
|
move clock.hfa into time.hfa, add getCPUTime, rename duration and time field to "tn", update mktime code
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[73abe95] | 1 | // |
---|
[0f56058] | 2 | // Cforall Version 1.0.0 Copyright (C) 2018 University of Waterloo |
---|
| 3 | // |
---|
| 4 | // The contents of this file are covered under the licence agreement in the |
---|
| 5 | // file "LICENCE" distributed with Cforall. |
---|
[73abe95] | 6 | // |
---|
| 7 | // time_t.hfa -- |
---|
| 8 | // |
---|
[0f56058] | 9 | // Author : Peter A. Buhr |
---|
| 10 | // Created On : Tue Apr 10 14:42:03 2018 |
---|
| 11 | // Last Modified By : Peter A. Buhr |
---|
[e0c235c] | 12 | // Last Modified On : Sun Jan 5 08:22:46 2020 |
---|
| 13 | // Update Count : 7 |
---|
[73abe95] | 14 | // |
---|
[0f56058] | 15 | |
---|
| 16 | #pragma once |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | //######################### Duration ######################### |
---|
| 20 | |
---|
| 21 | struct Duration { // private |
---|
[e0c235c] | 22 | int64_t tn; // nanoseconds |
---|
[0f56058] | 23 | }; // Duration |
---|
| 24 | |
---|
[e0c235c] | 25 | static inline void ?{}( Duration & dur ) with( dur ) { tn = 0; } |
---|
| 26 | static inline void ?{}( Duration & dur, __attribute__((unused)) zero_t ) with( dur ) { tn = 0; } |
---|
[0f56058] | 27 | |
---|
| 28 | |
---|
| 29 | //######################### Time ######################### |
---|
| 30 | |
---|
| 31 | struct Time { // private |
---|
[e0c235c] | 32 | uint64_t tn; // nanoseconds since UNIX epoch |
---|
[0f56058] | 33 | }; // Time |
---|
| 34 | |
---|
[e0c235c] | 35 | static inline void ?{}( Time & time ) with( time ) { tn = 0; } |
---|
| 36 | static inline void ?{}( Time & time, __attribute__((unused)) zero_t ) with( time ) { tn = 0; } |
---|
[0f56058] | 37 | |
---|
| 38 | // Local Variables: // |
---|
| 39 | // mode: c // |
---|
| 40 | // tab-width: 4 // |
---|
| 41 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.