| Index: tools/cygprofile/cygprofile.cc
|
| diff --git a/tools/cygprofile/cygprofile.cc b/tools/cygprofile/cygprofile.cc
|
| index 2086bea5ec9b458074e1cf737043e61e923701c7..980fa9e070010413793d70637665281de6fa2c3f 100644
|
| --- a/tools/cygprofile/cygprofile.cc
|
| +++ b/tools/cygprofile/cygprofile.cc
|
| @@ -208,7 +208,7 @@ CygCommon::CygCommon() {
|
| }
|
| }
|
| mapsfile.close();
|
| - header_line_.append("\nsecs\tmsecs\tpid:threadid\tfunc\n");
|
| + header_line_.append("\nsecs\tusecs\tpid:threadid\tfunc\n");
|
| }
|
|
|
| void CygTlsLog::LogEnter(void* this_fn) {
|
| @@ -222,9 +222,9 @@ void CygTlsLog::LogEnter(void* this_fn) {
|
| base::AutoLock lock(log_mutex_);
|
| if (buf_.capacity() < kBufMaxSize)
|
| buf_.reserve(kBufMaxSize);
|
| - struct timeval timestamp;
|
| - gettimeofday(×tamp, NULL);
|
| - buf_.push_back(CygLogEntry(time(NULL), timestamp.tv_usec,
|
| + struct timespec timestamp;
|
| + clock_gettime(CLOCK_MONOTONIC, ×tamp);
|
| + buf_.push_back(CygLogEntry(timestamp.tv_sec, timestamp.tv_nsec / 1000,
|
| getpid(), pthread_self(), this_fn));
|
| if (buf_.size() == kBufMaxSize) {
|
| FlushLog();
|
|
|