Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys/sys.cc')
-rw-r--r--src/sys/sys.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/sys/sys.cc b/src/sys/sys.cc
index a9958f4..4c3f38f 100644
--- a/src/sys/sys.cc
+++ b/src/sys/sys.cc
@@ -4,13 +4,10 @@
the terms of the GNU General Public License version 2
*/
-// project headers
-#include "sys/sys.h"
-// system headers
#ifdef _WIN32
-#include <dlfcn.h>
+#include <windows.h>
#else
@@ -21,15 +18,17 @@
#include <sys/types.h>
#endif
+
#include <stdlib.h>
+#include "sys/sys.h"
+
namespace sys {
void mkdir(const char *path)
{
#ifdef _WIN32
- ::mkdir(path);
- return true;
+ mkdir(path);
#else
::mkdir(path, 0777);
#endif
@@ -60,14 +59,16 @@ unsigned long time()
::localtime_r(&epochtime, &localtime);
return ((unsigned long) (localtime.tm_sec + localtime.tm_min*60 + localtime.tm_hour*3600));
#else
- retrun 0;
+ return 0;
#endif
}
void sleep(float seconds)
{
#ifndef _WIN32
- ::usleep((useconds_t) (seconds * 1000000.0) );
+ ::usleep((useconds_t) (seconds * 1000000.0f) );
+#else
+ Sleep((DWORD) (seconds*1000.0f));
#endif
}
@@ -76,3 +77,4 @@ void quit(int status) {
}
}
+