Mercurial > hg > vamp-plugin-sdk
comparison vamp-sdk/RealTime.h @ 80:e33fa45f0935
* avoid trying to use timeval if building on Windows
author | cannam |
---|---|
date | Tue, 18 Sep 2007 09:39:58 +0000 |
parents | 6683f99107cf |
children | fe31e6aed666 |
comparison
equal
deleted
inserted
replaced
79:c72fddf9aecb | 80:e33fa45f0935 |
---|---|
45 #define _VAMP_REAL_TIME_H_ | 45 #define _VAMP_REAL_TIME_H_ |
46 | 46 |
47 #include <iostream> | 47 #include <iostream> |
48 #include <string> | 48 #include <string> |
49 | 49 |
50 #ifndef _WIN32 | |
50 struct timeval; | 51 struct timeval; |
52 #endif | |
51 | 53 |
52 namespace Vamp { | 54 namespace Vamp { |
53 | 55 |
54 /** | 56 /** |
55 * \class RealTime RealTime.h <vamp-sdk/RealTime.h> | 57 * \class RealTime RealTime.h <vamp-sdk/RealTime.h> |
72 RealTime(const RealTime &r) : | 74 RealTime(const RealTime &r) : |
73 sec(r.sec), nsec(r.nsec) { } | 75 sec(r.sec), nsec(r.nsec) { } |
74 | 76 |
75 static RealTime fromSeconds(double sec); | 77 static RealTime fromSeconds(double sec); |
76 static RealTime fromMilliseconds(int msec); | 78 static RealTime fromMilliseconds(int msec); |
79 | |
80 #ifndef _WIN32 | |
77 static RealTime fromTimeval(const struct timeval &); | 81 static RealTime fromTimeval(const struct timeval &); |
82 #endif | |
78 | 83 |
79 RealTime &operator=(const RealTime &r) { | 84 RealTime &operator=(const RealTime &r) { |
80 sec = r.sec; nsec = r.nsec; return *this; | 85 sec = r.sec; nsec = r.nsec; return *this; |
81 } | 86 } |
82 | 87 |