mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-19 07:34:08 +00:00
darwin: remove invalid characters
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#include <Mw/Milsko.h>
|
||||
#include <Mw/Milsko.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
long MwTimeGetTick(void) {
|
||||
return GetTickCount();
|
||||
return GetTickCount();
|
||||
}
|
||||
|
||||
void MwTimeSleep(int ms) {
|
||||
@@ -12,13 +12,13 @@ void MwTimeSleep(int ms) {
|
||||
long MwTimeGetTick(void) {
|
||||
struct timespec ts;
|
||||
long n = 0;
|
||||
clock_serv_t cclock;
|
||||
clock_serv_t cclock;
|
||||
mach_timespec_t mts;
|
||||
|
||||
|
||||
host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
|
||||
clock_get_time(cclock, &mts);
|
||||
mach_port_deallocate(mach_task_self(), cclock);
|
||||
|
||||
|
||||
n += ts.tv_nsec / 1000 / 1000;
|
||||
n += ts.tv_sec * 1000;
|
||||
|
||||
@@ -36,12 +36,12 @@ void MwTimeSleep(int ms) {
|
||||
long MwTimeGetTick(void) {
|
||||
struct timespec ts;
|
||||
long n = 0;
|
||||
|
||||
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
|
||||
n += ts.tv_nsec / 1000 / 1000;
|
||||
n += ts.tv_sec * 1000;
|
||||
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user