fixed timer on linux

This commit is contained in:
Arvid Norberg
2007-04-12 07:02:17 +00:00
parent 05e16f8fbd
commit a0434eba10

View File

@@ -335,7 +335,7 @@ namespace libtorrent
{ {
timespec ts; timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts); clock_gettime(CLOCK_MONOTONIC, &ts);
return ptime(boost::int64_t(ts.tv_sec) + ts.tv_nsec / 1000); return ptime(boost::int64_t(ts.tv_sec) * 1000000 + ts.tv_nsec / 1000);
} }
inline time_duration microsec(boost::int64_t s) inline time_duration microsec(boost::int64_t s)