CppTest
Version 2.0.0
src
cpptest-time.h
Go to the documentation of this file.
1
// ---
2
//
3
// $Id: cpptest-time.h,v 1.3 2005/06/08 08:08:06 nilu Exp $
4
//
5
// CppTest - A C++ Unit Testing Framework
6
// Copyright (c) 2003 Niklas Lundell
7
//
8
// ---
9
//
10
// This library is free software; you can redistribute it and/or
11
// modify it under the terms of the GNU Lesser General Public
12
// License as published by the Free Software Foundation; either
13
// version 2 of the License, or (at your option) any later version.
14
//
15
// This library is distributed in the hope that it will be useful,
16
// but WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
// Lesser General Public License for more details.
19
//
20
// You should have received a copy of the GNU Lesser General Public
21
// License along with this library; if not, write to the
22
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23
// Boston, MA 02111-1307, USA.
24
//
25
// ---
26
29
#ifndef CPPTEST_TIME_H
30
#define CPPTEST_TIME_H
31
32
#include <iostream>
33
#include <string>
34
35
namespace
Test
36
{
43
class
Time
44
{
45
public
:
46
Time
();
47
Time
(
unsigned
int
sec,
unsigned
int
usec);
48
49
unsigned
int
seconds
()
const
;
50
unsigned
int
microseconds
()
const
;
51
52
static
Time
current
();
53
54
friend
Time
operator+(
const
Time
& t1,
const
Time
& t2);
55
friend
Time
operator-(
const
Time
& t1,
const
Time
& t2);
56
57
friend
std::ostream& operator<<(std::ostream& os,
const
Time
& t);
58
59
private
:
60
unsigned
int
_sec;
61
unsigned
int
_usec;
62
};
63
64
}
// namespace Test
65
66
#endif // #ifndef CPPTEST_TIME_H
Test::Time
Time representation.
Definition:
cpptest-time.h:43
Test::Time::Time
Time()
Definition:
time.cpp:56
Test::Time::seconds
unsigned int seconds() const
Definition:
time.cpp:74
Test::Time::microseconds
unsigned int microseconds() const
Definition:
time.cpp:82
Test
Definition:
collectoroutput.cpp:37
Test::Time::current
static Time current()
Definition:
time.cpp:90
Generated by
1.8.17