diff options
| author | Alexander Gavrilov | 2012-09-05 19:45:45 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-09-05 19:45:45 +0400 |
| commit | 57086ac56eb489abd0c7759aed084020edc71148 (patch) | |
| tree | 06b3e64f5f9114ae762ca1d2a99d08382a63ce23 /library/Process-linux.cpp | |
| parent | 27f169e298e658f3957aa2db1f76fe8aa20caef7 (diff) | |
| download | dfhack-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-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"; |
