summaryrefslogtreecommitdiff
path: root/library/Process-darwin.cpp
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-09-05 19:45:45 +0400
committerAlexander Gavrilov2012-09-05 19:45:45 +0400
commit57086ac56eb489abd0c7759aed084020edc71148 (patch)
tree06b3e64f5f9114ae762ca1d2a99d08382a63ce23 /library/Process-darwin.cpp
parent27f169e298e658f3957aa2db1f76fe8aa20caef7 (diff)
downloaddfhack-57086ac56eb489abd0c7759aed084020edc71148.tar.gz
dfhack-57086ac56eb489abd0c7759aed084020edc71148.tar.bz2
dfhack-57086ac56eb489abd0c7759aed084020edc71148.tar.xz
Add stock MessageBox and InputBox dialog screens for lua scripts.
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];