summaryrefslogtreecommitdiff
path: root/library/Process-darwin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'library/Process-darwin.cpp')
-rw-r--r--library/Process-darwin.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/library/Process-darwin.cpp b/library/Process-darwin.cpp
index 5a97d9e0..3893cfc5 100644
--- a/library/Process-darwin.cpp
+++ b/library/Process-darwin.cpp
@@ -27,6 +27,7 @@ distribution.
#include <errno.h>
#include <unistd.h>
#include <sys/mman.h>
+#include <sys/time.h>
#include <mach-o/dyld.h>
@@ -262,6 +263,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()
{
char path[1024];