diff options
Diffstat (limited to 'library/Process-linux.cpp')
| -rw-r--r-- | library/Process-linux.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/library/Process-linux.cpp b/library/Process-linux.cpp index fe864784..4a66470f 100644 --- a/library/Process-linux.cpp +++ b/library/Process-linux.cpp @@ -27,6 +27,7 @@ distribution. #include <errno.h> #include <unistd.h> #include <sys/mman.h> +#include <sys/time.h> #include <string> #include <vector> @@ -192,6 +193,13 @@ bool Process::getThreadIDs(vector<uint32_t> & threads ) return true; } +uint32_t Process::getTickCount() +{ + struct timeval tp; + gettimeofday(&tp, NULL); + return (tp.tv_sec * 1000) + (tp.tv_usec / 1000); +} + string Process::getPath() { const char * cwd_name = "/proc/self/cwd"; |
