// // Cforall Version 1.0.0 Copyright (C) 2018 University of Waterloo // // The contents of this file are covered under the licence agreement in the // file "LICENCE" distributed with Cforall. // // time_t.h -- // // Author : Peter A. Buhr // Created On : Tue Apr 10 14:42:03 2018 // Last Modified By : Peter A. Buhr // Last Modified On : Tue Apr 10 16:32:04 2018 // Update Count : 3 // #pragma once //######################### Duration ######################### struct Duration { // private int64_t tv; // nanoseconds }; // Duration static inline void ?{}( Duration & dur ) with( dur ) { tv = 0; } static inline void ?{}( Duration & dur, Duration d ) with( dur ) { tv = d.tv; } static inline void ?{}( Duration & dur, zero_t ) with( dur ) { tv = 0; } //######################### Time ######################### struct Time { // private uint64_t tv; // nanoseconds since UNIX epoch }; // Time static inline void ?{}( Time & t ) with( t ) { tv = 0; } // fast void ?{}( Time & time, int year, int month = 0, int day = 0, int hour = 0, int min = 0, int sec = 0, int nsec = 0 ); // slow static inline void ?{}( Time & t, zero_t ) { t.tv = 0; } // Local Variables: // // mode: c // // tab-width: 4 // // End: //