1 /********************************************************************** 2 * 3 * Copyright (C) 2001 – 2018 by Diether Knof 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU General Public License as 7 * published by the Free Software Foundation; either version 2 of 8 * the License, or (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * You can find this license in the file 'gpl.txt'. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 19 * MA 02111-1307 USA 20 * 21 * Contact: 22 * Diether Knof dknof@posteo.de 23 * 24 ********************************************************************/ 25 26 #pragma once 27 28 #include <time.h> 29 #include <iosfwd> 30 using std::ostream; 31 32 struct Time { 33 static Time current(); 34 35 Time() = default; 36 Time(time_t sec, unsigned msec); 37 ~Time() = default; 38 39 // the seconds 40 time_t sec = 0; 41 // the mili seconds 42 unsigned msec = 0; 43 44 }; // struct Time 45 46 ostream& operator<<(ostream& ostr, Time const& time); 47