Get rid of struct Time

We just need the milliseconds of current system
time for our needs. This allows to simplify the
API.

No functional change.
This commit is contained in:
Marco Costalba
2012-09-04 09:38:51 +02:00
parent 5900ab76a0
commit b50ce5ebfb
6 changed files with 28 additions and 26 deletions

View File

@@ -44,15 +44,10 @@ struct Log : public std::ofstream {
};
struct Time {
int64_t msec() const { return time_to_msec(t); }
int elapsed() const { return int(now().msec() - msec()); }
static Time now() { Time t; system_time(&t.t); return t; }
private:
sys_time_t t;
};
namespace Time {
typedef int64_t point;
point now();
}
template<class Entry, int Size>