| 1 | #cxx . . $ `<file>/melder/melder_time.h`/ifndef _melder_time_h_ |
| 2 | #define _melder_time_h_cxx . . $ `melder/melder_time.h:2:9`! |
| 3 | /* melder_time.h |
| 4 | * |
| 5 | * Copyright (C) 1992-2016,2018,2020,2021,2025 Paul Boersma |
| 6 | * |
| 7 | * This code is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 3 of the License, or (at |
| 10 | * your option) any later version. |
| 11 | * |
| 12 | * This code is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 15 | * See the GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 19 | */ |
| 20 | |
| 21 | double Melder_stopwatchcxx . . $ Melder_stopwatch(31fa7155c10fdd13). (); |
| 22 | |
| 23 | void Melder_sleepcxx . . $ Melder_sleep(ba8836b59fb42830). (double duration); |
| 24 | |
| 25 | double Melder_clockcxx . . $ Melder_clock(31fa7155c10fdd13). (); // typically the number of seconds since system start-up, with microsecond precision |
| 26 | |
| 27 | class MelderStopwatchcxx . . $ MelderStopwatch# { |
| 28 | double _lastTimecxx . . $ MelderStopwatch#_lastTime. { 0.0 }; |
| 29 | public: |
| 30 | MelderStopwatchcxx . . $ MelderStopwatch#MelderStopwatch(49f6e7a06ebc5aa8). () { |
| 31 | ourcxx . . $ `melder/melder.h:42:9`! _lastTimecxx . . $ MelderStopwatch#_lastTime. = Melder_clockcxx . . $ Melder_clock(31fa7155c10fdd13). (); |
| 32 | } |
| 33 | double operatorcxx . . $ MelderStopwatch#`operator()`(31fa7155c10fdd13).() () { |
| 34 | const double now = Melder_clockcxx . . $ Melder_clock(31fa7155c10fdd13). (); |
| 35 | const double timeElapsed = now - ourcxx . . $ `melder/melder.h:42:9`! _lastTimecxx . . $ MelderStopwatch#_lastTime.; |
| 36 | ourcxx . . $ `melder/melder.h:42:9`! _lastTimecxx . . $ MelderStopwatch#_lastTime. = now; |
| 37 | return timeElapsed; |
| 38 | } |
| 39 | }; |
| 40 | |
| 41 | autostring32cxx . . $ autostring32# date_STRcxx . . $ date_STR(19b925b58261db21). (); |
| 42 | autostring32cxx . . $ autostring32# date_utc_STRcxx . . $ date_utc_STR(19b925b58261db21). (); |
| 43 | |
| 44 | autostring32cxx . . $ autostring32# date_iso_STRcxx . . $ date_iso_STR(19b925b58261db21). (); |
| 45 | autostring32cxx . . $ autostring32# date_utc_iso_STRcxx . . $ date_utc_iso_STR(19b925b58261db21). (); |
| 46 | |
| 47 | autoVECcxx . . $ autoVEC# date_VECcxx . . $ date_VEC(dc54b7e5180588ba). (); |
| 48 | autoVECcxx . . $ autoVEC# date_utc_VECcxx . . $ date_utc_VEC(dc54b7e5180588ba). (); |
| 49 | |
| 50 | /* End of file melder_time.h */ |
| 51 | #endif |